/// <summary> /// Constructor for the Ostrich /// </summary> public Ostrich() { changing = false; height = 67; width = 50; cheatMode = false; type = "Ostrich"; Value = 2000; lives = 3; score = 0; speed = 0; angle = 0; nSpeed = 0; nAngle = 0; stateMachine = new StateMachine(); StandState stand = new StandState(this); stateMachine.stateDict.Add("flap", new FlapState(this)); stateMachine.stateDict.Add("stand", stand); stateMachine.stateDict.Add("fall", new FallState(this)); stateMachine.stateDict.Add("dead", new DeadState(this)); stateMachine.stateDict.Add("spawn", new SpawnState(this)); stateMachine.currentState = stand; imagePath = "Images/Player/player_stand.png"; leftDown = false; rightDown = false; World.Instance.objects.Add(this); }
public Ostrich() { type = "Ostrich"; oLock = "lock"; Value = 2000; lives = 3; score = 0; speed = 0; angle = 0; nSpeed = 0; nAngle = 0; stateMachine = new StateMachine(); StandState stand = new StandState(this); stateMachine.stateDict.Add("flap", new FlapState(this)); stateMachine.stateDict.Add("stand", stand); stateMachine.stateDict.Add("fall", new FallState(this)); stateMachine.currentState = stand; imagePath = "Images/Player/player_stand.png"; leftDown = false; rightDown = false; World.Instance.objects.Add(this); }