public void TransferToState(APlayerState state) { // Debug.Log("Exiting: " + currentState); // Debug.Log("Entering: " + state); currentState.OnExit(this); currentState = state; currentState.OnEnter(this); }
private void Awake() { fileDetails = null; rigidbody2d.gravityScale = 0; FindObjectOfType <TileInfo>().levelGrid = levelgrid; currentState.OnEnter(this); }