コード例 #1
0
 void Start()
 {
     inventory          = transform.Find("Inventory").gameObject;
     abilityBar         = transform.Find("Ability Bar").gameObject;
     darkener           = transform.Find("Darkener").GetComponent <Image>();
     inventoryStartPos  = inventory.transform.localPosition;
     abilityBarStartPos = abilityBar.transform.localPosition;
     player             = GameObject.Find("Player").GetComponent <Player>();
     abilitySlots       = transform.Find("Ability Bar").GetComponentsInChildren <AbilitySlotHandler>();
     mouseSlot          = inventory.transform.Find("Mouse Slot").GetComponent <MouseSlotHandler>();
 }
コード例 #2
0
 protected override void Start()
 {
     base.Start();
     inventory = transform.parent.parent.parent.GetComponent <InventoryHandler>();
     mouseSlot = inventory.transform.Find("Mouse Slot").GetComponent <MouseSlotHandler>();
 }