protected override void Awake()
 {
     base.Awake();
     cam            = GetComponentInChildren <Camera> ();
     stateMachine   = new SM_Player(this);
     stateRunning   = new State_Grounded_Running(this, stateMachine, rb, cam);
     stateSprinting = new State_Grounded_Sprinting(this, stateMachine, rb, cam);
     animator       = GetComponentInChildren <Animator> ();
 }
Example #2
0
 // Start is called before the first frame update
 public void Setup(SM_Player player)
 {
     localPlayer = player;
 }