Esempio n. 1
0
    private void UpgradeOnClick()
    {
        if (_currentItemAmount < 1)
        {
            TipLabel.SetLabel("素材不足");
        }
        else
        {
            int currentLv;
            if (_data.NeedPower > 0) //Is SpellCard
            {
                _member.SpellCardLvUp(_data.ID);
                currentLv = _member.SpellCardDic[_data.ID];
            }
            else
            {
                _member.SkillLvUp(_data.ID);
                currentLv = _member.SkillDic[_data.ID];
            }
            ItemManager.Instance.MinusItem(_consumeBookId, 1, _itemManagerType);
            SetData(_data, currentLv);

            if (_isSpellCard)
            {
                SkillScrollView.SetData(new ArrayList(_member.SpellCardDic));
            }
            else
            {
                SkillScrollView.SetData(new ArrayList(_member.SkillDic));
            }
            SkillScrollView.AddClickHandler(SkillOnClick);
        }
    }
Esempio n. 2
0
 void Awake()
 {
     CloseButton.onClick.AddListener(CloseOnClick);
     GoButton.onClick.AddListener(GoOnClick);
     WarehouseScrollView.AddClickHandler(WarehouseIconOnClick);
     BagScrollView.AddClickHandler(BagIconOnClick);
 }
Esempio n. 3
0
    private void Awake()
    {
        SetActionGroupVisible(false);
        SetMoveConfirmVisible(false);
        SetReturnActionVisible(false);
        SkillScrollView.gameObject.SetActive(false);
        ResultUI.gameObject.SetActive(false);
        BattleFieldUI.gameObject.SetActive(false);

        MoveActionButton.onClick.AddListener(MoveActionOnClick);
        SkillActionButton.onClick.AddListener(SkillActionOnClick);
        SpellCardActionButton.onClick.AddListener(SpellCardActionOnClick);
        ItemActionButton.onClick.AddListener(ItemActionOnClick);
        UndoButton.onClick.AddListener(UndoOnClick);
        IdleButton.onClick.AddListener(IdleOnClick);
        MoveConfirmButton.onClick.AddListener(MoveConfirmOnClick);
        ReturnActionButton.onClick.AddListener(ReturnActionOnClick);
        EscapeButton.onClick.AddListener(EscapeOnClick);
        GiveUpButton.onClick.AddListener(GiveUpOnClick);
        Screen.ClickHandler = ScreenOnClick;
        Screen.DownHandler  = StartDragCamera;
        Screen.PressHandler = OnDragCamera;
        Screen.UpHandler    = EndDragCamera;
        SkillScrollView.AddClickHandler(SkillOnClick);
    }
Esempio n. 4
0
    void Awake()
    {
        ClearInfo();

        UpgradeButton.OnClickHandler = UpgradeOnClick;
        CloseButton.onClick.AddListener(Close);
        ScrollView.AddClickHandler(EquipOnClick);
    }
 // Start is called before the first frame update
 void Start()
 {
     for (int i = 0; i < 20; i++)
     {
         NumberList.Add(i.ToString());
     }
     ScrollView.SetData(new ArrayList(NumberList));
     ScrollView.AddClickHandler(ButtonOnClick);
 }
 private void Awake()
 {
     //GroupScrollView.AddClickHandler(GroupOnClick);
     for (int i = 0; i < MapButtons.Length; i++)
     {
         MapButtons[i].OnClickHandler = MapOnClick;
     }
     FloorScrollView.AddClickHandler(FloorOnClick);
     MapCloseButton.onClick.AddListener(CloseOnClick);
     FloorCloseButton.onClick.AddListener(CloseOnClick);
 }
Esempio n. 7
0
    void Awake()
    {
        ClearInfo();

        EquipComment.gameObject.SetActive(false);
        BuyButton.gameObject.SetActive(false);
        BuyButton.ClickHandler = BuyOnClick;
        ItemButton.onClick.AddListener(ItemOnClick);
        EquipButton.onClick.AddListener(EquipOnClick);
        CloseButton.onClick.AddListener(Close);
        ScrollView.AddClickHandler(MenuOnClick);
    }
Esempio n. 8
0
    void Awake()
    {
        MakeButton.gameObject.SetActive(false);

        CloseButton.onClick.AddListener(CloseOnClick);
        MakeButton.onClick.AddListener(MakeOnClick);
        ScrollView.AddClickHandler(IconOnClick);

        for (int i = 0; i < MaterialButtons.Length; i++)
        {
            MaterialButtons[i].ClickHandler = MaterialOnClick;
        }
    }
Esempio n. 9
0
    void Awake()
    {
        NameLabel.text    = string.Empty;
        AmountLabel.text  = string.Empty;
        CommentLabel.text = string.Empty;

        EquipComment.gameObject.SetActive(false);
        SellButton.gameObject.SetActive(false);
        SellButton.ClickHandler = SellOnClick;
        CloseButton.onClick.AddListener(Close);
        AllButton.onClick.AddListener(AllOnClick);
        MaterialButton.onClick.AddListener(MaterialOnClick);
        FoodButton.onClick.AddListener(FoodOnClick);
        MedicineButton.onClick.AddListener(MedicineOnClick);
        EquipButton.onClick.AddListener(EquipOnClick);
        ScrollView.AddClickHandler(MenuOnClick);
    }
Esempio n. 10
0
    void Awake()
    {
        DiscardButton.gameObject.SetActive(false);
        UseButton.gameObject.SetActive(false);
        SelectCharacterGroup.gameObject.SetActive(false);
        UsingLabel.SetActive(false);

        CloseButton.onClick.AddListener(CloseOnClick);
        AllButton.onClick.AddListener(AllOnClick);
        MaterialButton.onClick.AddListener(MaterialOnClick);
        FoodButton.onClick.AddListener(FoodOnClick);
        MedicineButton.onClick.AddListener(MedicineOnClick);
        EquipButton.onClick.AddListener(EquipOnClick);
        UseButton.onClick.AddListener(UseOnClick);
        DiscardButton.onClick.AddListener(DiscardOnClick);
        SelectCharacterGroup.CharacterOnClickHandler = CharacterOnClick;
        ScrollView.AddClickHandler(IconOnClick);
    }