Global Game Jam 2023
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.5 KiB

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using NaughtyAttributes;
  5. /// <summary>
  6. ///
  7. /// </summary>
  8. public class PlayerController : MonoBehaviour
  9. {
  10. #region Inspector Fields
  11. public OarController oar;
  12. public HandController leftHand;
  13. public HandController rightHand;
  14. #endregion Inspector Fields
  15. #region Private Fields
  16. #endregion Private Fields
  17. #region Getters
  18. #endregion Getters
  19. #region MonoBehaviour Functions
  20. /// <summary>
  21. /// OnEnable is called when the object becomes enabled and active.
  22. /// </summary>
  23. private void OnEnable()
  24. {
  25. }
  26. /// <summary>
  27. /// OnDisable is called when the behaviour becomes disabled.
  28. /// </summary>
  29. private void OnDisable()
  30. {
  31. }
  32. /// <summary>
  33. /// Update is called once per frame
  34. /// </summary>
  35. private void FixedUpdate()
  36. {
  37. leftHand.UpdateHand(leftHand.m_desiredInput);
  38. rightHand.UpdateHand(rightHand.m_desiredInput);
  39. oar.UpdateTransform();
  40. if (oar.isColliding())
  41. {
  42. leftHand.UndoLastMovement();
  43. rightHand.UndoLastMovement();
  44. }
  45. }
  46. #endregion MonoBehaviour Functions
  47. #region Class Functionality
  48. #endregion Class Functionality
  49. #region Editor Functions
  50. /// <summary>
  51. /// Called when the Component is created or Reset from the Inspector
  52. /// </summary>
  53. private void Reset()
  54. {
  55. //useful for finding components on creation
  56. }
  57. #endregion Editor Functions
  58. }