Beispiel #1
0
    // Spawns the corp player and then turns on his controller and camera
    // TODO Turn on (and make!) the GUI
    void SpawnCorp()
    {
        GameObject corpGO = PhotonNetwork.Instantiate("Corp", corp.transform.position, corp.transform.rotation, 0);

        ((MonoBehaviour)corpGO.GetComponent("CorpController")).enabled = true;
        CorpController corpController = corpGO.GetComponent <CorpController>();

        corpGO.transform.FindChild("MainCamera").gameObject.SetActive(true);
        corpUI.SetActive(true);
    }
Beispiel #2
0
    public CorpController findCorpController()
    {
        CorpController cc = GameObject.FindObjectOfType(typeof(CorpController)) as CorpController;

        return(cc);
    }