using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Realtime;
using Photon.Pun;
using Photon.Pun.UtilityScripts;
public class GameManager : MonoBehaviourPunCallbacks
{
public GameObject[] spawnPointsBlue;
public GameObject[] spawnPointsRed;
public Player[] meinTeamArray;
[SerializeField] private PhotonTeamsManager pt;
void Awake()
{
if (PhotonNetwork.IsConnected)
{
//Wichtig!!!! Die Custom Propertie für das Team heisst: "_pt" und ist bei Team Blau 1 und bei Team Rot 2!!!!!
if (PhotonNetwork.LocalPlayer.CustomProperties[1] == "_pt")
{
Debug.Log("PhotonNetwork.LocalPlayer.CustomProperties[1] == _pt" + " war richtig");
}
if (PhotonNetwork.LocalPlayer.CustomProperties["_pt"] == "1")
{
Debug.Log("PhotonNetwork.LocalPlayer.CustomProperties[_pt] == 1" + " war richtig");
}
if (PhotonNetwork.LocalPlayer.CustomProperties[2] == "_pt")
{
Debug.Log("PhotonNetwork.LocalPlayer.CustomProperties[2] == _pt" + " war richtig");
}
if (PhotonNetwork.LocalPlayer.CustomProperties["_pt"] == "2")
{
Debug.Log("PhotonNetwork.LocalPlayer.CustomProperties[_pt] == 2" + " war richtig");
}
/*
//Team als int bekommen:
var team = PhotonNetwork.LocalPlayer.CustomProperties["_pt"];
if ((int)team == 1)
{
//Blau
float Z = Random.Range(-231, 72);
PhotonNetwork.Instantiate("Player", new Vector3(-1100, 320, Z), Quaternion.identity);
}
if ((int)team == 2)
{
//Rot
float Z = Random.Range(-231, 72);
PhotonNetwork.Instantiate("Player", new Vector3(515, 320, Z), Quaternion.identity);
}
*/
}
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}