private void Awake() { spriteHandlerController = GetComponent <SpriteHandlerController>(); myItem = GetComponent <ItemAttributesV2>(); myPickupable = GetComponent <Pickupable>(); TryInit(); }
public void Awake() { itemAttributes = GetComponent <ItemAttributesV2>(); spriteHandlerController = GetComponent <SpriteHandlerController>(); pickupable = GetComponent <Pickupable>(); if (color == (int)SwordColor.Random) { color = Random.Range(1, 5); } worldRenderer.SetActive(false); }
private void EnsureInit() { if (itemAttributes != null) { return; } itemAttributes = GetComponent <ItemAttributesV2>(); spriteHandlerController = GetComponent <SpriteHandlerController>(); pickupable = GetComponent <Pickupable>(); if (color == (int)SwordColor.Random) { color = Random.Range(1, 5); } worldRenderer.SetActive(false); }
private void Awake() { spriteHandlerController = GetComponent <SpriteHandlerController>(); TryInit(); }