protected void NotifySetAnimation(BlockAnimationType blockAnimationType, bool canOverride, bool disableSounds) { if (this.GameBlockSetAnimationEvent != null) { this.GameBlockSetAnimationEvent(this, new GameBlockSetAnimationEventArgs(blockAnimationType, canOverride, disableSounds)); } }
public void OnMoving(MovementDirection direction, float pixels) { if (this.lastDirection == null || this.lastDirection != direction) { this.lastDirection = direction; IGameBlockParent gameBlockParent = this.GameBlock as IGameBlockParent; if (gameBlockParent != null) { if (gameBlockParent.AvailableMoves > 0) { BlockAnimationType animationType = gameBlockParent.GetPreparingMoveAnimation(direction); GameObject animationObject = this.animationMappingsDictionary[animationType]; this.SetAnimation(animationObject, true, false); } } } }
public GameBlockSetAnimationEventArgs(BlockAnimationType animationType, bool canOverride, bool disableSounds) { this.AnimationType = animationType; this.CanOverride = canOverride; this.DisableSounds = disableSounds; }