예제 #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);
		}
	}
예제 #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 ());
	}
예제 #3
0
 // Use this for initialization
 void Awake()
 {
     mapGenerator = GameObject.Find("TileGenParent").GetComponent <MapGen> ();
     idStore      = GameObject.Find("PlayerManager").GetComponent <PlayerIDs> ();
 }
예제 #4
0
	// Use this for initialization
	void Awake () {
		mapGenerator = GameObject.Find ("TileGenParent").GetComponent<MapGen> ();
		idStore = GameObject.Find ("PlayerManager").GetComponent<PlayerIDs> ();
	}
예제 #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> ();
	}
예제 #6
0
	// Use this for initialization
	void Start () {
		idStore = GameObject.Find ("PlayerManager").GetComponent<PlayerIDs> ();
		GSManager = GameObject.Find ("GameState").GetComponent<GameStateManager> ();
	}
예제 #7
0
 // Use this for initialization
 void Start()
 {
     idStore   = GameObject.Find("PlayerManager").GetComponent <PlayerIDs> ();
     GSManager = GameObject.Find("GameState").GetComponent <GameStateManager> ();
 }
예제 #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)));