Example #1
0
 public void PauseBird()
 {
     birdStopped = true;
     BirdState   = BirdStateE.stopped;
     BirdSpeed   = 0;
     SetAnimationScript();
 }
Example #2
0
 public void ResetBird()
 {
     rundist = 0;
     MoveBirdGos(0);
     birdStopped = true;
     BirdState   = BirdStateE.atstart;
     SetAnimationScript();
 }
Example #3
0
 public bool sbsAtStart()
 {
     if (BirdState == BirdStateE.running)
     {
         initBirdVel = BirdVel;
         BirdVel     = 0;
     }
     BirdState = BirdStateE.atstart;
     return(true);
 }
Example #4
0
 public void StartBird()
 {
     //Debug.Log("StartBird called");
     birdStopped = false;
     BirdSpeed   = initBirdSpeed;
     if (BirdSpeed == 0)
     {
         BirdSpeed = 1; // this should not happen
     }
     BirdState = BirdStateE.running;
     SetAnimationScript();
 }
Example #5
0
 void SetAtGoal()
 {
     if (BirdState == BirdStateE.atgoal)
     {
         return;
     }
     birdStopped   = true;
     BirdState     = BirdStateE.atgoal;
     initBirdSpeed = BirdSpeed;
     BirdSpeed     = 0;
     SetAnimationScript();
 }
Example #6
0
 void initValues()
 {
     BirdSpeed     = 0;
     BirdFlyHeight = 1.5f;
     lookaheadtime = 1.1f;
     initBirdSpeed = 1;
     rundist       = 0;
     curpt         = Vector3.zero;
     birdform      = BirdFormE.person;
     birdStopped   = true;
     BirdState     = BirdStateE.dormant;
     //Debug.Log("birdctrl initValues called");
 }
Example #7
0
        void initValues()
        {
            BirdVel       = 0;
            BirdFlyHeight = 1.2f;
            lookaheadtime = 1.1f;
            initBirdVel   = 1;
            rundist       = 0;
            curptlc       = Vector3.zero;
            birdform      = BirdFormE.hummingbird;
            BirdState     = BirdStateE.unbuilt;

            //RouteMan.Log("birdctrl initValues called");
        }
Example #8
0
 public void SetBirdPath(Path path, bool stopbird = false)
 {
     this.path = path;
     curpt     = Vector3.zero;
     lastcurpt = Vector3.zero;
     rundist   = 0;
     if (stopbird)
     {
         if (BirdState == BirdStateE.running)
         {
             initBirdSpeed = BirdSpeed;
             BirdSpeed     = 0;
         }
         BirdState = BirdStateE.atstart;
     }
 }
Example #9
0
 public bool sbsAtGoal()
 {
     BirdState = BirdStateE.atgoal;
     return(true);
 }
Example #10
0
 public bool sbsPaused()
 {
     BirdState = BirdStateE.paused;
     return(true);
 }
Example #11
0
 public bool sbsRunning()
 {
     BirdState = BirdStateE.running;
     return(true);
 }