This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AniamtionController : MonoBehaviour | |
| { | |
| [SerializeField] private PlayerControllerHolder playerControllerHolder; | |
| private void Start() | |
| { | |
| if (playerControllerHolder == null) | |
| return; | |
| playerControllerHolder.PlayerController.PlayAnimation(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ExitTrigger : MonoBehaviour | |
| { | |
| [SerializeField] private string levelName; | |
| private void OnTriggerEnter(Collider other) | |
| { | |
| if (other.tag == "Player") | |
| { | |
| GameEvents.InvokeSceneChange(levelName); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GameController : MonoBehaviour | |
| { | |
| [SerializeField] private InputActionReference menuInput; | |
| [SerializeField] private InputActionReference exitMenuInput; | |
| [SerializeField] private UIController uiController; | |
| [SerializeField] private PlayerController playerController; | |
| private void OnEnable() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [RequireComponent(typeof(CharacterController))] | |
| public class PlayerController : MonoBehaviour | |
| { | |
| [SerializeField] private float maxSpeed = 5f; | |
| [SerializeField] private float rotationSpeed = 360f; | |
| [SerializeField] private float accelerationFactor = 5f; | |
| [SerializeField] private float decelerationFactor = 10f; | |
| [SerializeField] private float gravity = -9.81f; |