void FindMe() { GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); if(myPlayer == null) { foreach (GameObject player in players) { if (player.GetComponent<NetworkIdentity>().isLocalPlayer) { dankInteract = player.GetComponentInChildren<DankInteract>(); dankInventory = player.GetComponent<DankInventory>(); //dankPlayerNetwork = player.GetComponent<PlayerNetwork>(); myPlayer = player; break; } } } else { isInteracted = (dankInteract.currentTarget == gameObject); } }
void Start() { if (!isLocalPlayer) { return; } dankInventory = GetComponent<DankInventory>(); }