Inheritance: FBLibrary.Core.BaseEntities.BasePowerUp
Exemplo n.º 1
0
        private void RemovePowerUp(PowerUp powerUp)
        {
            _powerUpList.Remove(powerUp);

            base.RemovePowerUp(powerUp);

            Program.Log.Info("Power up at " + powerUp.CellPosition + " has been removed.");
        }
Exemplo n.º 2
0
        public void SendPowerUpPickUp(Client client, PowerUp powerUp)
        {
            NetOutgoingMessage message = _server.CreateMessage();

            message.Write((byte)MessageType.ServerMessage.PowerUpPickUp);

            message.Write(client.ClientId);
            message.Write(powerUp.CellPosition);
            message.Write((byte)powerUp.Type);

            _server.SendToAll(message, NetDeliveryMethod.ReliableOrdered);

            Program.Log.Info("[SENT] Power up pick up by client #" + client.ClientId + " ! (type: " + powerUp.Type + "|position: " + powerUp.CellPosition + ")");
        }
Exemplo n.º 3
0
        public override void AddPowerUp(Point position)
        {
            var powerUp = new PowerUp(position);
            _powerUpList.Add(powerUp);

            GameServer.Instance.SendPowerUpDrop(powerUp);

            base.AddPowerUp(powerUp);
        }
Exemplo n.º 4
0
        public void SendPowerUpDrop(PowerUp powerUp)
        {
            NetOutgoingMessage message = _server.CreateMessage();

            message.Write((byte)MessageType.ServerMessage.PowerUpDrop);

            message.Write((byte)powerUp.Type);
            message.Write(powerUp.CellPosition);

            _server.SendToAll(message, NetDeliveryMethod.ReliableOrdered);

            Program.Log.Info("[SEND] Power up dropped ! (type: " + powerUp.Type + "|position: " + powerUp.CellPosition + ")");
        }