예제 #1
0
    void setIdentity()
    {
        if (!isLocalPlayer) {
            myTransform.name = playerUniqueIdentity;
        }
        else{
            myTransform.name = MakeUniqueIdentity();
        }
        GameObject[] Players = GameObject.FindGameObjectsWithTag ("Player");
        foreach (GameObject Player in Players){
            string otherName = Player.GetComponent<Player_ID>().playerUniqueIdentity;
            if (otherName != playerUniqueIdentity){
                if (otherName != ""){
                    playerTeam = Player_Board.e_player.PLAYER2;
                    PlayerTeamText.text = "Player One";
                }
                else{
                    playerTeam = Player_Board.e_player.PLAYER1;
                    PlayerTeamText.text = "Player Two";

                }
            }
        }
        if (isLocalPlayer)
            GetComponent<Player_Board>().CreateBoards(this);
    }
예제 #2
0
    public void OnClickEnemy(int enemyID)
    {
        e_enemy newEnemy = (e_enemy)enemyID;

        if (PlayerMonsterScript == null) {
            InGameInterface menu = GetComponent<InGameInterface> ();
            playerTeam = menu.playerTeam;
            GameObject[] players = GameObject.FindGameObjectsWithTag ("Player");
            foreach (GameObject player in players) {
                if (player.GetComponent<Player_ID>().playerTeam == playerTeam)
                    PlayerMonsterScript = player.GetComponent<Player_MonstersSpawn>();
            }
        }
        PlayerMonsterScript.WannaCreateMob (newEnemy, playerTeam);
    }
예제 #3
0
 public void InitInterfaces(Player_Board.e_player player, GameObject thePlayerObject)
 {
     playerTeam = player;
     PlayerObject = thePlayerObject;
     changeMenuMode (e_InterfaceMode.IN_GAME);
 }
예제 #4
0
 public void setPlayerBoard(Player_Board.e_player p)
 {
     m_player = p;
 }