public CharacterContext(Direction dir, PositionState posState, State state, VulnState vulnState, int remainingJumps) { this.remainingJumps = remainingJumps; this.dir = dir; this.posState = posState; this.state = state; this.vulnState = vulnState; }
protected void Init() { health = maxHealth; jumpsRemaining = numAirJumps; direction = Direction.Right; state = State.Free; vulnState = VulnState.Neutral; positionState = PositionState.Grounded; UpdateAvailableActions(); currentAction = GetAction(); velocity = new Vector2(); StartCoroutine("Act"); StartCoroutine("AerialMovement"); }