public void Awake() { playerCoreScript = GameObject.FindWithTag("Player").GetComponent <PlayerCoreScript>(); Transform statsUI = transform.Find("Stats"); attackValue = statsUI.Find("AttackValue").GetComponent <TextMeshProUGUI>(); forceValue = statsUI.Find("ForceValue").GetComponent <TextMeshProUGUI>(); reachValue = statsUI.Find("ReachValue").GetComponent <TextMeshProUGUI>(); speedValue = statsUI.Find("SpeedValue").GetComponent <TextMeshProUGUI>(); elementValue = statsUI.Find("ElementValue").GetComponent <TextMeshProUGUI>(); keysHeldValue = statsUI.Find("KeysHeldValue").GetComponent <TextMeshProUGUI>(); foreach (InventorySlotScript iss in inventorySlots) { iss.inventoryManager = this; } }
void Start() { rigidBody = GetComponent <Rigidbody2D>(); playerCoreScript = GetComponent <PlayerCoreScript>(); aniscr = GetComponent <AnimationScript>(); }
// Start is called before the first frame update void Start() { coolDown = 0; playerCoreScript = GetComponent <PlayerCoreScript>(); }