示例#1
0
 private void Awake()
 {
     spriteHandlerController = GetComponent <SpriteHandlerController>();
     myItem       = GetComponent <ItemAttributesV2>();
     myPickupable = GetComponent <Pickupable>();
     TryInit();
 }
示例#2
0
    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);
    }
示例#3
0
    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);
    }
示例#4
0
 private void Awake()
 {
     spriteHandlerController = GetComponent <SpriteHandlerController>();
     TryInit();
 }