Ejemplo n.º 1
0
    public void RpcEndGame(LobbyPlayer.PlayerTeam teamWon)
    {
        // Display on screen of you lost or won
        GameManager._instance.GameFinished(teamWon);

        //Server
        isEngGame    = true;
        timerNewGame = Utility.StartTimer(timeBeforeNewGame);
    }
Ejemplo n.º 2
0
 public void GameFinished(LobbyPlayer.PlayerTeam teamLost)
 {
     if (localPlayer.playerTeam == teamLost)
     {
         SoundManager._instance.PlaySound(SoundManager.SoundList.LOSE_SOUND);
         UpdateInfoText("Your team loses the game..");
     }
     else
     {
         SoundManager._instance.PlaySound(SoundManager.SoundList.WIN_SOUND);
         UpdateInfoText("Your team wins the game !");
     }
 }
Ejemplo n.º 3
0
    public Sprite GetSprite(SkinType type, LobbyPlayer.PlayerTeam team, bool isDead = false)
    {
        if (team == LobbyPlayer.PlayerTeam.RED)
        {
            if (!isDead)
            {
                switch (type)
                {
                case SkinType.ANGRY: return(red_angrySkin);

                case SkinType.ANGRY_CAT: return(red_angryCatSkin);

                case SkinType.ANGRY_CHINESE: return(red_angryChineseSkin);

                case SkinType.ANGRY_CHINESE_CAT: return(red_angryChineseCatSkin);

                case SkinType.ANGRY_ROOK: return(red_angryRookSkin);

                case SkinType.CAT: return(red_catSkin);

                case SkinType.CHINESE: return(red_chineseSkin);

                case SkinType.CHINESE_CAT: return(red_chineseCatSkin);

                case SkinType.HAPPY: return(red_happySkin);

                case SkinType.HAPPY_CAT: return(red_happyCatSkin);

                case SkinType.NORMAL: return(red_normalSkin);
                }
            }
            else
            {
                switch (type)
                {
                case SkinType.ANGRY:
                case SkinType.ANGRY_ROOK:
                case SkinType.HAPPY:
                case SkinType.NORMAL:
                    return(red_deadNormalSkin);

                case SkinType.ANGRY_CAT:
                case SkinType.CAT:
                case SkinType.ANGRY_CHINESE_CAT:
                case SkinType.CHINESE_CAT:
                case SkinType.HAPPY_CAT:
                    return(red_deadCatSkin);

                case SkinType.CHINESE:
                case SkinType.ANGRY_CHINESE:
                    return(red_deadChineseSkin);
                }
            }
        }
        else
        {
            if (!isDead)
            {
                switch (type)
                {
                case SkinType.ANGRY: return(blue_angrySkin);

                case SkinType.ANGRY_CAT: return(blue_angryCatSkin);

                case SkinType.ANGRY_CHINESE: return(blue_angryChineseSkin);

                case SkinType.ANGRY_CHINESE_CAT: return(blue_angryChineseCatSkin);

                case SkinType.ANGRY_ROOK: return(blue_angryRookSkin);

                case SkinType.CAT: return(blue_catSkin);

                case SkinType.CHINESE: return(blue_chineseSkin);

                case SkinType.CHINESE_CAT: return(blue_chineseCatSkin);

                case SkinType.HAPPY: return(blue_happySkin);

                case SkinType.HAPPY_CAT: return(blue_happyCatSkin);

                case SkinType.NORMAL: return(blue_normalSkin);
                }
            }
            else
            {
                switch (type)
                {
                case SkinType.ANGRY:
                case SkinType.ANGRY_ROOK:
                case SkinType.HAPPY:
                case SkinType.NORMAL:
                    return(blue_deadNormalSkin);

                case SkinType.ANGRY_CAT:
                case SkinType.CAT:
                case SkinType.ANGRY_CHINESE_CAT:
                case SkinType.CHINESE_CAT:
                case SkinType.HAPPY_CAT:
                    return(blue_deadCatSkin);

                case SkinType.CHINESE:
                case SkinType.ANGRY_CHINESE:
                    return(blue_deadChineseSkin);
                }
            }
        }
        return(null);
    }
Ejemplo n.º 4
0
 private void OnChangeTeam(LobbyPlayer.PlayerTeam newTeam)
 {
     UpdateSkin();
     UpdateSpawnPosition();
 }