コード例 #1
0
ファイル: FallState.cs プロジェクト: ccock237/Joust-Game
 // Movement changes that happens while in the fall state
 public void Update()
 {
     ostrich.nSpeed = 300;
     ostrich.nAngle = 270;
     ostrich.MoveLeftRight();
     ostrich.WrapAround();
 }
コード例 #2
0
 // Moves the Ostrich up and changes to the falling state after 100 miliseconds
 public void Update()
 {
     ostrich.nSpeed = 1000;
     ostrich.nAngle = 90;
     Task.Run(() =>
     {
         Thread.Sleep(100);
         if (stateMachine.currentState.ToString() == "flap")
         {
             stateMachine.Change("fall");
         }
     });
     ostrich.MoveLeftRight();
     ostrich.WrapAround();
 }
コード例 #3
0
ファイル: StandState.cs プロジェクト: ccock237/Joust-Game
 // Updates the ostrich's position
 public void Update()
 {
     ostrich.MoveLeftRight();
     ostrich.WrapAround();
 }