コード例 #1
0
 protected void NotifySetAnimation(BlockAnimationType blockAnimationType, bool canOverride, bool disableSounds)
 {
     if (this.GameBlockSetAnimationEvent != null)
     {
         this.GameBlockSetAnimationEvent(this, new GameBlockSetAnimationEventArgs(blockAnimationType, canOverride, disableSounds));
     }
 }
コード例 #2
0
ファイル: GamePiece.cs プロジェクト: ttat/puzzlewarrior
    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);
                }
            }
        }
    }
コード例 #3
0
 public GameBlockSetAnimationEventArgs(BlockAnimationType animationType, bool canOverride, bool disableSounds)
 {
     this.AnimationType = animationType;
     this.CanOverride   = canOverride;
     this.DisableSounds = disableSounds;
 }
コード例 #4
0
ファイル: GameBlockBase.cs プロジェクト: ttat/puzzlewarrior
 protected void NotifySetAnimation(BlockAnimationType blockAnimationType, bool canOverride, bool disableSounds)
 {
     if (this.GameBlockSetAnimationEvent != null)
     {
         this.GameBlockSetAnimationEvent(this, new GameBlockSetAnimationEventArgs(blockAnimationType, canOverride, disableSounds));
     }
 }