コード例 #1
0
ファイル: GameObject.cs プロジェクト: Rogachev99/PUBG
        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
ファイル: MockPlayer.cs プロジェクト: Rogachev99/PUBG
 public void Update_GamerDied(IMessage msg)
 {
     Received_GamerDied.Invoke(msg);
 }