protected void OverwriteAnimation(GameObject gobj, GameObjectAnimation Animation) { if (!animationQueues.ContainsKey(gobj)) justAdded.Add(gobj); Animation.Reset(); Queue<GameObjectAnimation> anis = getQueue(gobj); anis.Clear(); anis.Enqueue(Animation); }
protected void EnqueueAnimation(GameObject gobj, GameObjectAnimation Animation) { if (!animationQueues.ContainsKey(gobj)) justAdded.Add(gobj); Animation.Reset(); Queue<GameObjectAnimation> anis = getQueue(gobj); anis.Enqueue(Animation); }
private void UpdateGobj(GameObject gobj, Queue<GameObjectAnimation> anis) { GameObjectAnimation ani = anis.Peek(); if (justAdded.Contains(gobj)) justAdded.Remove(gobj); updateAni(ani, anis, gobj); if (this.animationQueues.Count == 0) this.IsFinished = true; }
public void UpdateAnimation() { if (this.currentGObjAni == null) { if (this.awaitingAnimations.Count > 0) { this.currentGObjAni = this.awaitingAnimations.Dequeue(); } else if (this.moveHandShakes.Count > 0) this.moveHandShakes.Dequeue().PerformHandShake(); } if (this.currentGObjAni != null) if (this.currentGObjAni.Update(this.gameObject)) this.currentGObjAni = null; }
private void updateAni(GameObjectAnimation ani, Queue<GameObjectAnimation> anis, GameObject gobj) { bool isLast = anis.Count == 1; if (ani.Update(gobj)) { if (!ani.AutoLooping) { anis.Dequeue(); if (anis.Count == 0 && AutoDelete) { animationQueues.Remove(gobj); GameObject.Destroy(gobj); } } } }
private void updateAni(GameObjectAnimation ani, Queue<GameObjectAnimation> anis, GameObject gobj) { bool isLast = anis.Count == 1; if (ani.Update(gobj)) { if (!ani.AutoLooping) { anis.Dequeue(); if (anis.Count == 0 && AutoDelete) { animationQueues.Remove(gobj); GameObject.Destroy(gobj); } } } }
public void Add(GameObjectAnimation ani, bool MustFinish) { this.animations.Add(ani, MustFinish); }
protected void SetUnitAnimation(StandardUnitAnimations aniId, GameObjectAnimation ani) { this.animations[aniId] = ani; }
public void AddAnimation(GameObjectAnimation ani) { anis.Add(ani); }
public void AddAnimation(GameObjectAnimation ani) { anis.Add(ani); }