Exemplo n.º 1
0
 private void onPieceAttacked(AttackPieceModel atk)
 {
     var attacker = pieces.Piece(atk.attackingPieceId);
     var currentItem = GetCurrent(atk.activatingPieceId, HistoryItemType.Attack, attacker.playerId);
     currentItem.triggeringPiece = attacker;
 }
Exemplo n.º 2
0
        public void onAttacked(AttackPieceModel attackPiece)
        {
            var piece = pieces.Piece(attackPiece.attackingPieceId);
            if(piece == null) return;

            var view = piece.pieceView;

            //TODO: Add more animation
            animationQueue.Add(
                new PieceView.RotateAnim()
                {
                    piece = view,
                    destAngle = DirectionAngle.angle[attackPiece.direction]
                }
            );
        }