Exemplo n.º 1
0
 protected void NotifySetAnimation(BlockAnimationType blockAnimationType, bool canOverride, bool disableSounds)
 {
     if (this.GameBlockSetAnimationEvent != null)
     {
         this.GameBlockSetAnimationEvent(this, new GameBlockSetAnimationEventArgs(blockAnimationType, canOverride, disableSounds));
     }
 }
Exemplo n.º 2
0
    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);
                }
            }
        }
    }
Exemplo n.º 3
0
 public GameBlockSetAnimationEventArgs(BlockAnimationType animationType, bool canOverride, bool disableSounds)
 {
     this.AnimationType = animationType;
     this.CanOverride   = canOverride;
     this.DisableSounds = disableSounds;
 }
Exemplo n.º 4
0
 protected void NotifySetAnimation(BlockAnimationType blockAnimationType, bool canOverride, bool disableSounds)
 {
     if (this.GameBlockSetAnimationEvent != null)
     {
         this.GameBlockSetAnimationEvent(this, new GameBlockSetAnimationEventArgs(blockAnimationType, canOverride, disableSounds));
     }
 }