protected void ChangeState(GhostMovementState ghostState) { foreach (MonogameGhost mg in Ghosts) { mg.Ghost.GhostState = ghostState; } }
public void SetMovementState(GhostMovementState state) { this.state = state; ClearMovementState(); switch (state) { case GhostMovementState.RunAway: moveDelegate = new MoveDelegate(RunAway); break; case GhostMovementState.ChasePlayer: moveDelegate = new MoveDelegate(ChasePlayer); break; case GhostMovementState.Idle: moveDelegate = new MoveDelegate(Idle); break; } }
public Ghost() { this._ghostState = GhostMovementState.Roaming; }