Ejemplo n.º 1
0
    // Use this for initialization
    void Start () {
		idStore = GameObject.Find ("PlayerManager").GetComponent<PlayerIDs> ();
        GSManager = GameObject.Find("GameState").GetComponent<GameStateManager>();
		wallCheck = GetComponentInChildren<WallCheck>();
		if (isServer) {
			GSManager.AddPlayer (this.gameObject);
		}
		if (isLocalPlayer) {
			GSManager.StoreLocalPlayer (this);
		}
	}
Ejemplo n.º 2
0
	// Use this for initialization
	void Start () {
		idStore = GameObject.Find ("PlayerManager").GetComponent<PlayerIDs> ();


		//Physics2D.Ig
		if (isServer) {
			GameObject.Find ("PlayerManager").GetComponent<CarryManager> ().AddPlayer (gameObject);
		}

		if (isLocalPlayer) {
			GetComponent<PlayerControl> ().enabled = true;
			GetComponent<ItemManager> ().enabled = true;
			GetComponentInChildren<WallCheck> ().enabled = true;
			GameObject.Find ("Main Camera").GetComponent<UnityStandardAssets._2D.Camera2DFollow> ().SetTarget (transform);
			//GameObject.Find ("MinimapCamera").GetComponent<UnityStandardAssets._2D.Camera2DFollow> ().SetTarget(transform);
		} else {
			Destroy (GetComponentInChildren<WallCheck> ().gameObject);
		}
		StartCoroutine (SetName ());
	}
Ejemplo n.º 3
0
 // Use this for initialization
 void Awake()
 {
     mapGenerator = GameObject.Find("TileGenParent").GetComponent <MapGen> ();
     idStore      = GameObject.Find("PlayerManager").GetComponent <PlayerIDs> ();
 }
Ejemplo n.º 4
0
	// Use this for initialization
	void Awake () {
		mapGenerator = GameObject.Find ("TileGenParent").GetComponent<MapGen> ();
		idStore = GameObject.Find ("PlayerManager").GetComponent<PlayerIDs> ();
	}
Ejemplo n.º 5
0
	// Use this for initialization
	void Start () {
		idStore = GameObject.Find ("PlayerManager").GetComponent<PlayerIDs> ();
		GSManager = GameObject.Find ("GameState").GetComponent<GameStateManager> ();
		notificationText = GameObject.Find ("Notice").GetComponent<NotificationText> ();
		mapGen = GameObject.Find ("TileGenParent").GetComponent<MapGen> ();
	}
Ejemplo n.º 6
0
	// Use this for initialization
	void Start () {
		idStore = GameObject.Find ("PlayerManager").GetComponent<PlayerIDs> ();
		GSManager = GameObject.Find ("GameState").GetComponent<GameStateManager> ();
	}
Ejemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     idStore   = GameObject.Find("PlayerManager").GetComponent <PlayerIDs> ();
     GSManager = GameObject.Find("GameState").GetComponent <GameStateManager> ();
 }
Ejemplo n.º 8
0
 //TODO: This is probably bad practice and should require something else be in place, or be auto-generated as a scoped variable.
 public override Task <VersaCommsID> GetIdentifier(string externalUser)
 =>
 Task.FromResult(PlayerIDs.GetOrAdd(externalUser, _ => CreateNewUser(externalUser)));