public void AddAnimation(System.Type type, ElementAnimation animation) { if (!animationsToAdd.ContainsKey(type)) { animationsToAdd.Add(type, animation); } }
public void SetBonus(Bonus bonus) { switch (bonus) { case Bonus.LineHorizontal: bonusAnimation = new HorizontalLineBonusElementAnimation(Game, this); break; case Bonus.LineVertical: bonusAnimation = new VerticalLineBonusElementAnimation(Game, this); break; case Bonus.Bomb: bonusAnimation = new BombElementAnimation(Game, this); break; } this.bonus = bonus; }
public void RemoveBonus() { this.bonus = null; this.bonusAnimation = null; }
private void onDestroyElementEnd(Object Sender, EventArgs e) { ElementAnimation a = Sender as ElementAnimation; events.Add(new GameEvent(a.element, DestroyElementEventHandler)); }