예제 #1
0
    private void Start()
    {
        controller = GetComponentInParent <RestController>();
        statusUI   = GetComponentInChildren <StatusUI>();
        wheelUI    = GetComponentInChildren <UnitWheelUI>();
        equipUI    = GetComponentInChildren <EquipUI>();
        upgradeUI  = GetComponentInChildren <UpgradeUI>();

        Hide();
    }
예제 #2
0
    private void Awake()
    {
        _instance       = this;
        equipmentCanvas = this.GetComponent <Canvas>();

        head      = transform.Find("EquipImage").Find("HeadImage").gameObject;
        armor     = transform.Find("EquipImage").Find("ArmorImage").gameObject;
        r_hand    = transform.Find("EquipImage").Find("RHandImage").gameObject;
        l_hand    = transform.Find("EquipImage").Find("LHandImage").gameObject;
        shoe      = transform.Find("EquipImage").Find("ShoeImage").gameObject;
        accessory = transform.Find("EquipImage").Find("AccessoryImage").gameObject;

        playerStatus = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <PlayerStatus>();
    }
예제 #3
0
    public void Equip(Item newItem)
    {
        Item.EquipmentSlot slot = newItem.myEquipSlot;
        if (slot == Item.EquipmentSlot.Head)
        {
            Debug.LogError("Should not be equipping to head " + newItem.name);
        }

        currentEquipment[slot] = newItem;
        if (UI == null)
        {
            UI = CanvasUI.instance.GetComponent <EquipUI>();
        }
        UI.UpdateUI(newItem, newItem.myEquipSlot);
        SendToBodyPart(newItem);
    }
 private void Start()
 {
     equipUI = GetComponentInParent <EquipUI>();
 }
예제 #5
0
 private void Start()
 {
     inv    = InventoryManager.GetInstance().GetInventory();
     myBody = GetComponent <BodyPartController>();
     UI     = CanvasUI.instance.GetComponent <EquipUI>();
 }