示例#1
0
        protected virtual void SendMessage(IMessage msg)
        {
            switch (msg.TypeMessage)
            {
            case TypesMessage.ChoiceWeapon:
                Received_ChoiceWeapon?.Invoke(msg);
                break;

            case TypesMessage.GamerDied:
                Received_GamerDied?.Invoke(msg);
                break;

            case TypesMessage.GotDamage:
                Received_GotDamage?.Invoke(msg);
                break;

            case TypesMessage.GoTo:
                Received_GoTo?.Invoke(msg);
                break;

            case TypesMessage.MakeShot:
                Received_MakeShot?.Invoke(msg);
                break;

            case TypesMessage.PlayerTurn:
                Received_PlayerTurn?.Invoke(msg);
                break;

            case TypesMessage.MakeReloadWeapon:
                Received_MakeReloadWeapon?.Invoke(msg);
                break;

            case TypesMessage.TryPickUp:
                Received_TryPickUp?.Invoke(msg);
                break;

            case TypesMessage.DeletedInMap:
                Received_DeletedInMap?.Invoke(msg);
                break;

            case TypesMessage.TimeQuantPassed:
                Received_TimeQuantPassed?.Invoke(msg);
                break;

            case TypesMessage.AddWeapon:
                Received_AddWeapon?.Invoke(msg);
                break;

            case TypesMessage.MakedKill:
                Received_MakedKill?.Invoke(msg);
                break;
            }
        }
示例#2
0
 public void Update_AddWeapon(IMessage msg)
 {
     Received_AddWeapon.Invoke(msg);
 }