public override void OnEnter() { base.OnEnter(); AIMonster thisMonster = thisObject as AIMonster; bool playingPrevious = !thisMonster.Player.IsStopped; //if (playingPrevious) thisMonster.Player.RunUntilEnd(); first = true; }
public override void Update(double timeDiff) { base.Update(timeDiff); AIMonster thisMonster = thisObject as AIMonster; if (!first && thisMonster.ModelDirection != wantedDirection) { thisMonster.Flip(); } }
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; } }