Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        myGM = GameObject.Find("GameManager").GetComponent<GameMangerScript>();

        Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(Camera.main, Vector3.left);
        transform.FindChild("P1Space").GetComponent<RectTransform>().position = screenPoint;
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        myGM = GameObject.Find("GameManager").GetComponent <GameMangerScript>();

        Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(Camera.main, Vector3.left);

        transform.FindChild("P1Space").GetComponent <RectTransform>().position = screenPoint;
    }
Ejemplo n.º 3
0
    private void Start()
    {
        Manager = this;

        if (playerPrefab == null)
        {
            Debug.LogError("No player prefab provided", this);
        }
        else
        {
            if (PlayerManager.localPlayerInstance == null)
            {
                Debug.Log("Instatiating player for " + SceneManager.GetActiveScene().name);
                PhotonNetwork.Instantiate(this.playerPrefab.name, new Vector3(0f, 5f, 0f), Quaternion.identity, 0);
            }
            else
            {
                Debug.Log("Do not need to load this player prefab, already exists");
            }
        }
    }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     MainScript = GameObject.Find("GameManager").GetComponent <GameMangerScript> ();
 }
 // Use this for initialization
 void Start()
 {
     MainScript = GameObject.Find ("GameManager").GetComponent<GameMangerScript> ();
 }
Ejemplo n.º 6
0
 private void Awake()
 {
     instance = this;
 }