Пример #1
0
 public override void OnEnter()
 {
     base.OnEnter();
     AIMonster thisMonster = thisObject as AIMonster;
     bool playingPrevious = !thisMonster.Player.IsStopped;
     //if (playingPrevious) thisMonster.Player.RunUntilEnd();
     first = true;
 }
Пример #2
0
        public override void Update(double timeDiff)
        {
            base.Update(timeDiff);
            AIMonster thisMonster = thisObject as AIMonster;

            if (!first && thisMonster.ModelDirection != wantedDirection)
            {
                thisMonster.Flip();
            }
        }
Пример #3
0
 public override void Update(double timeDiff)
 {
     base.Update(timeDiff);
     AIMonster thisMonster = thisObject as AIMonster;
     if ( first /*&& thisMonster.Player.IsStopped*/) 
     {
         thisMonster.Player.SetClip(animationClip);
         first = false;
         if (repeat)
         {
             thisMonster.Player.StartClip();
         }
         else 
         {
             thisMonster.Player.RunOnce();
         }
         return;
     }
     
 }