コード例 #1
0
        public override void processMessage(NetWorker.Utilities.RawMessage message)
        {
            int minionInstanceId  = message.getInt("miid");
            int boardId           = message.getInt("tbid");
            int towerIndexOnBoard = message.getInt("tiob");

            Minion       minion = Engine.Game.getMinionById(minionInstanceId);
            DroseraTower tower  = (DroseraTower)Engine.Game.getBoardById(boardId).towers[towerIndexOnBoard];

            Runner.Graphics.tower_droseraTower_bite(tower, minion);
        }
コード例 #2
0
        public static void sendMessage(ICollection <Player> receiverPlayers, DroseraTower tower, Minion targetedMinion)
        {
            RawMessage msg = new RawMessage();

            msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GTower_DoseraTower_Bite)));

            if (receiverPlayers != null && receiverPlayers.Count != 0)
            {
                msg.putInt("tiob", tower.indexOnBoard);
                msg.putInt("tbid", tower.board.instanceId);
                msg.putInt("miid", targetedMinion.instanceId);

                foreach (var receiverPlayer in receiverPlayers)
                {
                    receiverPlayer.user.session.client.SendMessage(msg);
                }
            }
        }
コード例 #3
0
ファイル: GraphicsGame.cs プロジェクト: btasdoven/ScienceWars
        public void tower_droseraTower_bite(DroseraTower tower, Minion minion)
        {
            DroseraTowerGUI gui = tower.tag as DroseraTowerGUI;

            gui.biteMinion(minion);
        }