public virtual IEnumerable <IProperty> GetProperties(Champion champion)
        {
            LoadProperty load;
            Random       rand = new Random();

            return(new IProperty[]
            {
                load = new LoadProperty(champion),
                new HealthProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(0, 4))),
                new StaminaProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(4, 4))),
                new ManaProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(8, 4))),
                new LuckProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(0, 2))),
                new StrengthProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(2, 2))),
                new ChampionDextrityProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(4, 2)), load),
                new WisdomProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(6, 2))),
                new VitalityProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(8, 2))),
                new AntiMagicProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(10, 2))),
                new AntiFireProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(12, 2))),
                new ChampionDefenseProperty(champion, 0),
                new SpellShieldDefenseProperty(),
                new FireShieldDefenseProperty(),
                new MagicalLightProperty(),
                new ShieldDefenseProperty(),
                new WaterProperty(1500 + rand.Next(256), 2048),
                new FoodProperty(1500 + rand.Next(256), 2048),
                new PoisonProperty()
            });
        }
Exemple #2
0
    IEnumerator OnClickCoroutine(GameObject btn_mice)   //Single Click
    {
        yield return(new WaitForSeconds(delayBetween2Clicks));

        if (Time.time - _lastClickTime < delayBetween2Clicks)
        {
            yield break;
        }

        _bLoadedActor = LoadActor(btn_mice, _actorParent.transform, actorScale);
        _btnClick     = btn_mice;

        LoadProperty loadProerty = new LoadProperty();

        loadProerty.LoadMiceProperty(btn_mice.transform.GetChild(0).gameObject, infoGroupsArea[1], 0);

        //Debug.Log(btn_mice.transform.GetChild(0).name);
        //Debug.Log("Simple click");
    }
Exemple #3
0
        public IEnumerable <IProperty> GetProperties(Champion champion)
        {
            LoadProperty load;

            return(new IProperty[]
            {
                load = new LoadProperty(champion),
                new HealthProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(0, 4))),
                new StaminaProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(4, 4))),
                new ManaProperty(GetValueOfDMHexEncoding(descriptor[4].Substring(8, 4))),
                new LuckProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(0, 2))),
                new StrengthProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(2, 2))),
                new DextrityProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(4, 2)), load),
                new WisdomProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(6, 2))),
                new VitalityProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(8, 2))),
                new AntiMagicProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(10, 2))),
                new AntiFireProperty(GetValueOfDMHexEncoding(descriptor[5].Substring(12, 2))),
            });
        }
Exemple #4
0
    public void OnItemClick(GameObject obj)
    {
        int itemType = int.Parse(obj.GetComponent <Item>().storeInfo[(int)StoreProperty.ItemType]);

        _lastItem = obj;

        buyingGoodsData[0] = obj.GetComponent <Item>().storeInfo[(int)StoreProperty.ItemID];
        buyingGoodsData[1] = obj.GetComponent <Item>().storeInfo[(int)StoreProperty.ItemName];
        buyingGoodsData[2] = obj.GetComponent <Item>().storeInfo[(int)StoreProperty.ItemType];

        LoadProperty loadProperty = new LoadProperty();

        loadProperty.LoadMiceProperty(obj, infoGroupsArea[4].transform.GetChild(0).gameObject, 0);
        loadProperty.LoadPrice(obj, infoGroupsArea[4].transform.GetChild(0).gameObject, itemType);

        _bLoadedActor = LoadActor(obj, infoGroupsArea[4].transform.GetChild(0).GetChild(0), actorScale);   // 錯誤 暫時道具沒有動畫物件

        infoGroupsArea[4].SetActive(true);
        EventMaskSwitch.Switch(infoGroupsArea[4]);
    }
Exemple #5
0
 set => SetValue(LoadProperty, value);
Exemple #6
0
 public ChampionDextrityProperty(int value, LoadProperty load)
 {
     this.load = load;
     BaseValue = this.value = value;
 }