Пример #1
0
 public void onTransformed(TransformPieceModel m)
 {
     addGenericHistory(m.pieceId, m.activatingPieceId);
 }
Пример #2
0
        public void onTransformed(TransformPieceModel transformed)
        {
            var piece = pieces.Piece(transformed.pieceId);
            if(piece == null) return;

            var view = piece.pieceView;

            animationQueue.Add(
                new PieceView.UpdateTextAnim()
                {
                    text = view.attackText,
                    textGO = view.attackGO,
                    current = view.piece.attack,
                    original = view.piece.baseAttack,
                    change = -1,
                    animFinished = pieceTextAnimFinished,
                    piece = view.piece
                }
            );
            animationQueue.Add(
                new PieceView.UpdateTextAnim()
                {
                    text = view.healthText,
                    textGO = view.healthGO,
                    current = view.piece.health,
                    original = view.piece.baseHealth,
                    change = -1,
                    animFinished = pieceTextAnimFinished,
                    piece = view.piece
                }
            );

            animationQueue.Add(
                new PieceView.UpdateHpBarAnim()
                {
                    piece = view
                }
            );
        }