예제 #1
0
    void Start()
    {
        m_button = new YGUISystem.GUIButton(transform.Find("Button").gameObject, ()=>{
            return true;
        });

        m_name = new YGUISystem.GUILable(transform.Find("Desc").gameObject);

        SetItemDesc();
    }
예제 #2
0
    void Start()
    {
        m_title = new YGUISystem.GUILable(transform.Find("Image/Text").gameObject);
        m_title.Text.text = RefData.Instance.RefTexts(MultiLang.ID.ExitTheGame);

        m_yes = new YGUISystem.GUILable(transform.Find("YesButton/Text").gameObject);
        m_yes.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Yes);

        m_no = new YGUISystem.GUILable(transform.Find("NoButton/Text").gameObject);
        m_no.Text.text = RefData.Instance.RefTexts(MultiLang.ID.No);
    }
예제 #3
0
    void Start()
    {
        m_admob = GameObject.Find("HudGUI/ADMob").GetComponent<ADMob>();
        m_title = new YGUISystem.GUILable(transform.Find("Image/Text").gameObject);
        m_title.Text.text = RefData.Instance.RefTexts(MultiLang.ID.GoToTheMainTitle);

        m_yes = new YGUISystem.GUILable(transform.Find("YesButton/Text").gameObject);
        m_yes.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Yes);

        m_no = new YGUISystem.GUILable(transform.Find("NoButton/Text").gameObject);
        m_no.Text.text = RefData.Instance.RefTexts(MultiLang.ID.No);
    }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        m_creature = transform.parent.gameObject.GetComponent<Creature>();
        m_guage = new YGUISystem.GUIGuage(transform.Find("Canvas/HP").gameObject,
                                           ()=>{return guageRemainRatio();},
        ()=>{return ""; }
        );

        Transform trans = transform.Find("Canvas/HP/Level/Text");
        if (trans != null)
        {
            m_level = new YGUISystem.GUILable(trans.gameObject);
        }

        Vector3 pos = m_creature.HPPointTransform.localPosition;
        pos.y += 1.5f;
        m_guage.RectTransform.transform.localPosition = pos;
        m_guage.RectTransform.transform.localScale = m_creature.HPPointTransform.localScale;
    }
예제 #5
0
    public void Init(GameObject tab, ItemObject itemObj)
    {
        m_itemObjOfWarehouse = itemObj;
        m_priceButton0 = new GUIPriceGemButton(transform, "GUIPriceButton0", ()=>{return true;});

        m_evolutionText = new YGUISystem.GUILable(transform.Find("PictureButton/Icon/EvolutionText").gameObject);
        m_item = new YGUISystem.GUIButton(transform.Find("PictureButton").gameObject, m_priceButton0.EnableChecker);
        m_item.Icon.Lable.Text.text = itemObj.Item.Description();
        m_item.Icon.Image = itemObj.ItemIcon;

        m_maxGoldPrice = new YGUISystem.GUIButton(transform.Find("MaxPriceButton").gameObject, m_priceButton0.EnableChecker);
        m_maxGoldPrice.Button.gameObject.SetActive(false);

        m_maxGemPrice = new YGUISystem.GUIButton(transform.Find("MaxGemButton").gameObject, m_priceButton0.EnableChecker);
        m_maxGemPrice.Button.gameObject.SetActive(false);

        m_iconAnimator = transform.Find("PictureButton/Icon").GetComponent<Animator>();
        m_item.Lable.Text.text = RefData.Instance.RefTexts(itemObj.Item.RefItem.desc);
        m_checkImage = tab.transform.Find("Checked").gameObject;
    }
예제 #6
0
    void Start()
    {
        m_admob = GameObject.Find("HudGUI/ADMob").GetComponent<ADMob>();

        m_sfxVolume = transform.Find("SFXGUI/Slider").gameObject.GetComponent<Slider>();
        m_bgmVolume = transform.Find("BGMGUI/Slider").gameObject.GetComponent<Slider>();

        m_sfxVolume.value = Warehouse.Instance.GameOptions.m_sfxVolume;
        m_bgmVolume.value = Warehouse.Instance.GameOptions.m_bgmVolume;

        m_close = new YGUISystem.GUILable(transform.Find("CloseButton/Text").gameObject);
        m_close.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Close);

        m_share = new YGUISystem.GUILable(transform.Find("ShareButton/Text").gameObject);
        m_share.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Share);

        m_credits = new YGUISystem.GUILable(transform.Find("CreditsButton/Text").gameObject);
        m_credits.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Credits);

        m_fanPage = new YGUISystem.GUILable(transform.Find("FanPageButton/Text").gameObject);
        m_fanPage.Text.text = RefData.Instance.RefTexts(MultiLang.ID.FanPage);

        m_wave = new YGUISystem.GUILable(transform.Find("RestartWaveGUI/Slider/Lable").gameObject);
        m_wave.Text.text = RefData.Instance.RefTexts(MultiLang.ID.RestartWave);
        m_waveSliderText = transform.Find("RestartWaveGUI/Slider/Text").gameObject.GetComponent<Text>();
        m_waveSlider = transform.Find("RestartWaveGUI/Slider").gameObject.GetComponent<Slider>();
        m_waveSlider.minValue = 0;
        m_waveSlider.maxValue = Warehouse.Instance.GameBestStats.WaveIndex+1;
        m_waveSlider.value = Warehouse.Instance.GameOptions.m_reWaveIndex.Value;
    }
예제 #7
0
    // Use this for initialization
    void Awake()
    {
        m_dropShip = transform.parent.Find("dropship").GetComponent<DropShip>();
        m_edgeRect = transform.Find("EdgeRect").GetComponent<BoxCollider>();

        m_followingCamera = Camera.main.GetComponentInChildren<FollowingCamera>();
        m_followingCamera.SetMainTarget(m_dropShip.gameObject);

        m_dungeon = transform.parent.GetComponent<Dungeon>();
        int dungeonId = m_dungeon.DungeonId;
        m_refWorldMap = RefData.Instance.RefWorldMaps[dungeonId];

        m_prefItemBox = Resources.Load<GameObject>("Pref/ItemBox/ItemBox");
        string[] itemTypeNames = Enum.GetNames(typeof(ItemData.Type));
        for(int i = 0; i < itemTypeNames.Length-1; ++i)
        {
            m_prefItemBoxSkins[i] = Resources.Load<GameObject>("Pref/ItemBox/item_" + itemTypeNames[i] + "_skin");
            if (m_prefItemBoxSkins[i] == null)
                Debug.Log("Pref/ItemBox/item_" + itemTypeNames[i] + "_skin");
        }

        m_stageText = new YGUISystem.GUILable(GameObject.Find("HudGUI/StatusGUI/Stage").gameObject);
        m_waveText = new YGUISystem.GUILable(GameObject.Find("HudGUI/StatusGUI/Wave").gameObject);

        Transform[] goals = transform.Find("GoalPoint").transform.GetComponentsInChildren<Transform>();
        m_goalPoints = new Transform[goals.Length-1];
        for(int i = 0; i < goals.Length-1; ++i)
            m_goalPoints[i] = goals[i+1];
    }
예제 #8
0
    void Start()
    {
        m_champ = GameObject.Find("Champ").GetComponent<Champ>();
        m_statusGUI = transform.parent.parent.Find("StatusGUI").GetComponent<ChampStatusGUI>();

        List<Ability> basicAbili = new List<Ability>();
        List<Ability> skillAbili = new List<Ability>();
        List<Ability> utilAbili = new List<Ability>();

        basicAbili.Add(new Ability(0.3f, "Damage",
        ()=>{
            m_backup.AlphaPhysicalAttackDamage+=3;
            int backup = m_champ.WeaponHolder.MainWeapon.GetDamage(m_backup);

            return m_champ.WeaponHolder.MainWeapon.GetDamage(m_champ.m_creatureProperty) + " -> " + "<color=yellow>" + (backup) + "</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.AlphaPhysicalAttackDamage+=3;
            --m_champ.RemainStatPoint;
        }));
        /*
        m_abilities.Add(new Ability(0.3f, "Inc Defence",
        ()=>{
            m_backup.AlphaPhysicalDefencePoint+=3;
            return m_champ.m_creatureProperty.PhysicalDefencePoint + " -> " + "<color=yellow>" + (m_backup.PhysicalDefencePoint) + "</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.AlphaPhysicalDefencePoint+=3;
            --m_champ.RemainStatPoint;
        }));
        */
        basicAbili.Add(new Ability(0.3f, "Health Max Up",
        ()=>{
            m_backup.AlphaMaxHP+=50;
            return m_champ.m_creatureProperty.MaxHP + " -> " + "<color=yellow>" + (m_backup.MaxHP) + "</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.AlphaMaxHP+=50;
            //m_champ.m_creatureProperty.Heal((int)m_champ.m_creatureProperty.MaxHP);
            --m_champ.RemainStatPoint;
        }));
        /*
        basicAbili.Add(new Ability(0.3f, "SP Max Up",
                                        ()=>{
            m_backup.AlphaMaxSP+=30;
            return m_champ.m_creatureProperty.MaxSP + " -> " + "<color=yellow>" + (m_backup.MaxSP) + "</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.AlphaMaxSP+=30;
            --m_champ.RemainStatPoint;
        }));

        basicAbili.Add(new Ability(0.3f, "SP Recovery Up",
                                        ()=>{
            m_backup.AlphaSPRecoveryPerSec+=1;
            return m_champ.m_creatureProperty.SPRecoveryPerSec + " -> " + "<color=yellow>" + (m_backup.SPRecoveryPerSec) + "/sec</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.AlphaSPRecoveryPerSec+=1;
            --m_champ.RemainStatPoint;
        }));
        */
        basicAbili.Add(new Ability(0.3f, "Move Speed Up",
                                        ()=>{
            m_backup.AlphaMoveSpeed+=1;
            return m_champ.m_creatureProperty.AlphaMoveSpeed + " -> " + "<color=yellow>" + (m_backup.AlphaMoveSpeed) + "</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.AlphaMoveSpeed+=1;
            --m_champ.RemainStatPoint;
        },
        ()=>{
            return m_champ.m_creatureProperty.AlphaMoveSpeed < Const.MaxAlphaMoveSpeed;
        }
        ));

        basicAbili.Add(new Ability(0.3f, "Critical Pack",
        ()=>{
            m_backup.AlphaCriticalChance += 0.1f;
            m_backup.AlphaCriticalDamage += 0.5f;
            return "Chance:"+(m_champ.m_creatureProperty.CriticalChance*100) + " -> " + "<color=yellow>" + (m_backup.CriticalChance*100) + "%</color>" + "\n" +
                "Damage:"+(m_champ.m_creatureProperty.CriticalDamage*100) + " -> " + "<color=yellow>" + (m_backup.CriticalDamage*100) + "%</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.AlphaCriticalChance += 0.1f;
            m_champ.m_creatureProperty.AlphaCriticalDamage += 0.5f;
            --m_champ.RemainStatPoint;
        },
        ()=>{
            switch(m_champ.WeaponHolder.MainWeapon.RefWeaponItem.id)
            {
            case Const.ChampLightningLauncherRefItemId:
            case Const.ChampFiregunRefItemId:
                return false;
            }

            return true;
        }
        ));

        /*
        m_abilities.Add(new Ability(0.1f, "Life Per Kill",
        ()=>{
            m_backup.AlphaLifeSteal += 1f;
            return (m_champ.m_creatureProperty.LifeSteal) + " -> " + "<color=yellow>" + (m_backup.LifeSteal) + "</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.AlphaLifeSteal += 1f;
            --m_champ.RemainStatPoint;
        }));
        */

        /*
        basicAbili.Add(new Ability(0.01f, "Weapon Lv Up",
                                    ()=>{
            Weapon weapon = m_champ.WeaponHolder.MainWeapon;
            int backup = weapon.Level+1;
            int ori = weapon.Level;
            return "Lv:" + (ori) + " -> " + "<color=yellow>" + (backup) + "</color>";
        },
        ()=>{
            m_champ.WeaponHolder.MainWeapon.LevelUp();
            --m_champ.RemainStatPoint;
        }
        ));
        */
        skillAbili.Add(new Ability(0.3f, RefData.Instance.RefTexts(RefData.Instance.RefItems[Const.EmbersRefItemId].name),
                                    ()=>{
            Weapon weapon = m_champ.WeaponHolder.MainWeapon.GetSubWeapon();
            int backup = 1;
            int ori = 0;
            if (weapon != null)
            {
                backup = weapon.Level+1;
                ori = weapon.Level;
            }

            return "Lv:" + (ori) + " -> " + "<color=yellow>" + (backup) + "</color>";
                //"SP:" + Weapon.GetSP(RefData.Instance.RefItems[132], ori) + " -> " + "<color=yellow>" +Weapon.GetSP(RefData.Instance.RefItems[132], backup)+ "</color>";
        },
        ()=>{
            Weapon weapon = m_champ.WeaponHolder.MainWeapon.GetSubWeapon();
            if (weapon != null)
            {
                weapon.LevelUp();
            }
            else
            {
                m_champ.SetSubWeapon(m_champ.WeaponHolder.MainWeapon, new ItemWeaponData(Const.EmbersRefItemId), new RefMob.WeaponDesc());
            }

            --m_champ.RemainStatPoint;
        },
        ()=>{
            switch(m_champ.WeaponHolder.MainWeapon.RefWeaponItem.id)
            {
            case Const.ChampGunRefItemId:
            case Const.ChampLightningLauncherRefItemId:
            case Const.ChampFiregunRefItemId:
            case Const.ChampBoomerangLauncherRefItemId:
                return false;
            }

            Weapon weapon = m_champ.WeaponHolder.MainWeapon.GetSubWeapon();
            if (weapon != null)
            {
                if (weapon.Level >= weapon.RefWeaponItem.maxLevel)
                    return false;
            }
            return true;
        }
        ));

        foreach (DamageDesc.BuffType buffType in System.Enum.GetValues(typeof(DamageDesc.BuffType)))
        {
            bool skip = false;
            switch(buffType)
            {
            case DamageDesc.BuffType.Count:
            case DamageDesc.BuffType.LevelUp:
            case DamageDesc.BuffType.Nothing:
            case DamageDesc.BuffType.Macho:
                skip = true;
                break;
            }

            if (skip == true)
                continue;

            string name = buffType.ToString() + " Chance";
            DamageDesc.BuffType capturedBuffType = buffType;

            utilAbili.Add(new Ability(0.3f, name,
                                        ()=>{
                float oriChance = m_champ.WeaponHolder.MainWeapon.WeaponStat.buffOnHitDesc.chance;
                float toChance = oriChance + 0.1f;
                return (oriChance*100) + " -> " + "<color=yellow>" + (toChance*100) + "%</color>";
            },
            ()=>{
                m_champ.WeaponHolder.MainWeapon.WeaponStat.buffOnHitDesc.chance += 0.1f;
                --m_champ.RemainStatPoint;
            },
            ()=>{

                return (m_champ.WeaponHolder.MainWeapon.WeaponStat.buffOnHitDesc.buffType == capturedBuffType &&
                        m_champ.WeaponHolder.MainWeapon.WeaponStat.buffOnHitDesc.chance < 100
                        );
            }
            ));
        }

        /*
        skillAbili.Add(new Ability(0.3f, "Fill " + (m_champ.WeaponHolder.MainWeapon.WeaponStat.skillId > 0 ? RefData.Instance.RefTexts(RefData.Instance.RefItems[m_champ.WeaponHolder.MainWeapon.WeaponStat.skillId].name) : ""),
                                   ()=>{
            int backup = m_champ.NuclearSkillStack+3;
            return (m_champ.NuclearSkillStack) + " -> " + "<color=yellow>" + (backup) + "</color>";
        },
        ()=>{
            m_champ.NuclearSkillStack += 3;
            --m_champ.RemainStatPoint;
        },
        ()=>{
            return m_champ.WeaponHolder.MainWeapon.WeaponStat.skillId > 0;
        }
        ));

        skillAbili.Add(new Ability(0.3f, "Fill Macho Skill",
                                   ()=>{
            int backup = m_champ.MachoSkillStack+3;
            return (m_champ.MachoSkillStack) + " -> " + "<color=yellow>" + (backup) + "</color>";
        },
        ()=>{
            m_champ.MachoSkillStack += 3;
            --m_champ.RemainStatPoint;
        }));
        */
        skillAbili.Add(new Ability(0.3f, RefData.Instance.RefTexts(RefData.Instance.RefItems[131].name),
                                    ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(131);
            int backup = 1;
            int ori = 0;
            if (weapon != null)
            {
                backup = weapon.Level+1;
                ori = weapon.Level;
            }

            return "Lv:" + (ori) + " -> " + "<color=yellow>" + (backup) + "</color>";
                //"SP:" + Weapon.GetSP(RefData.Instance.RefItems[131], ori) + " -> " + "<color=yellow>" +Weapon.GetSP(RefData.Instance.RefItems[131], backup)+ "</color>";
        },
        ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(131);
            if (weapon != null)
            {
                weapon.LevelUp();
            }
            else
            {
                m_champ.EquipPassiveSkillWeapon(new ItemWeaponData(131), null);
            }

            --m_champ.RemainStatPoint;
        },
        ()=>{
            switch(m_champ.WeaponHolder.MainWeapon.RefWeaponItem.id)
            {
            case Const.ChampGunRefItemId:
                Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(131);
                if (weapon != null)
                {
                    if (weapon.Level >= weapon.RefWeaponItem.maxLevel)
                        return false;
                }
                return true;
            case Const.ChampLightningLauncherRefItemId:
            case Const.ChampFiregunRefItemId:
            case Const.ChampGuidedRocketLauncherRefItemId:
            case Const.ChampRocketLauncherRefItemId:
            case Const.ChampBoomerangLauncherRefItemId:
                break;
            }

            return false;
        }
        ));

        skillAbili.Add(new Ability(0.3f, RefData.Instance.RefTexts(RefData.Instance.RefItems[134].name),
                                   ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(134);
            int backup = 1;
            int ori = 0;
            if (weapon != null)
            {
                backup = weapon.Level+1;
                ori = weapon.Level;
            }

            return "Lv:" + (ori) + " -> " + "<color=yellow>" + (backup) + "</color>";
        },
        ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(134);
            if (weapon != null)
            {
                weapon.LevelUp();
            }
            else
            {
                m_champ.EquipPassiveSkillWeapon(new ItemWeaponData(134), null);
            }

            --m_champ.RemainStatPoint;
        },
        ()=>{
            switch(m_champ.WeaponHolder.MainWeapon.RefWeaponItem.id)
            {
            case Const.ChampBoomerangLauncherRefItemId:
                Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(134);
                if (weapon != null)
                {
                    if (weapon.Level >= weapon.RefWeaponItem.maxLevel)
                        return false;
                }
                return true;
            case Const.ChampGunRefItemId:
            case Const.ChampLightningLauncherRefItemId:
            case Const.ChampFiregunRefItemId:
            case Const.ChampGuidedRocketLauncherRefItemId:
            case Const.ChampRocketLauncherRefItemId:
                break;
            }

            return false;
        }
        ));

        skillAbili.Add(new Ability(0.3f, RefData.Instance.RefTexts(RefData.Instance.RefItems[129].name),
                                   ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(129);
            int backup = 1;
            int ori = 0;
            if (weapon != null)
            {
                backup = weapon.Level+1;
                ori = weapon.Level;
            }

            return "Lv:" + (ori) + " -> " + "<color=yellow>" + (backup) + "</color>";
                //"SP:" + Weapon.GetSP(RefData.Instance.RefItems[129], ori) + " -> " + "<color=yellow>" +Weapon.GetSP(RefData.Instance.RefItems[129], backup)+ "</color>";
        },
        ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(129);
            if (weapon != null)
            {
                weapon.LevelUp();
            }
            else
            {
                m_champ.EquipPassiveSkillWeapon(new ItemWeaponData(129), null);
            }

            --m_champ.RemainStatPoint;
        },
        ()=>{
            switch(m_champ.WeaponHolder.MainWeapon.RefWeaponItem.id)
            {
            case Const.ChampLightningLauncherRefItemId:
                Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(129);
                if (weapon != null)
                {
                    if (weapon.Level >= weapon.RefWeaponItem.maxLevel)
                        return false;
                }
                return true;
            case Const.ChampFiregunRefItemId:
            case Const.ChampGunRefItemId:
            case Const.ChampBoomerangLauncherRefItemId:
            case Const.ChampGuidedRocketLauncherRefItemId:
            case Const.ChampRocketLauncherRefItemId:
                break;
            }

            return false;
        }
        ));

        skillAbili.Add(new Ability(0.3f, RefData.Instance.RefTexts(RefData.Instance.RefItems[135].name),
                                   ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(135);
            int backup = 1;
            int ori = 0;
            if (weapon != null)
            {
                backup = weapon.Level+1;
                ori = weapon.Level;
            }

            return "Lv:" + (ori) + " -> " + "<color=yellow>" + (backup) + "</color>";
        },
        ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(135);
            if (weapon != null)
            {
                weapon.LevelUp();
            }
            else
            {
                m_champ.EquipPassiveSkillWeapon(new ItemWeaponData(135), null);
            }

            --m_champ.RemainStatPoint;
        },
        ()=>{
            switch(m_champ.WeaponHolder.MainWeapon.RefWeaponItem.id)
            {
            case Const.ChampFiregunRefItemId:

                Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(135);
                if (weapon != null)
                {
                    if (weapon.Level >= weapon.RefWeaponItem.maxLevel)
                        return false;
                }
                return true;
            case Const.ChampGunRefItemId:
            case Const.ChampBoomerangLauncherRefItemId:
            case Const.ChampLightningLauncherRefItemId:
            case Const.ChampGuidedRocketLauncherRefItemId:
            case Const.ChampRocketLauncherRefItemId:
                return false;
            }

            return false;

        }
        ));
        /*
        skillAbili.Add(new Ability(0.3f, "Charge to Nuclear Skill",
                                   ()=>{
            return (m_champ.NuclearSkillStack) + " -> " + "<color=yellow>" + (m_champ.NuclearSkillStack+1) + "</color>" + "\n" +
                    "SP:" + Weapon.GetSP(RefData.Instance.RefItems[133], 1);
        },
        ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetActiveWeapon(133);
            if (weapon != null)
            {
                //weapon.LevelUp();
            }
            else
            {
                m_champ.EquipActiveWeapon(new ItemWeaponData(133, null));
            }
            ++m_champ.NuclearSkillStack;
            --m_champ.RemainStatPoint;
        }));
        */
        skillAbili.Add(new Ability(0.3f, "Fill " + RefData.Instance.RefItems[130].name,
                                   ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(130);
            m_backup.Shield += 10;
            return (m_champ.m_creatureProperty.Shield) + " -> " + "<color=yellow>" + (m_backup.Shield) + "</color>";
                //"SP:" + Weapon.GetSP(RefData.Instance.RefItems[130], 1);
        },
        ()=>{
            Weapon weapon = m_champ.WeaponHolder.GetPassiveSkillWeapon(130);
            if (weapon != null)
            {
                weapon.LevelUp();
            }
            else
            {
                m_champ.EquipPassiveSkillWeapon(new ItemWeaponData(130), null);
            }

            --m_champ.RemainStatPoint;
        }));

        utilAbili.Add(new Ability(0.3f, "Splash Radius",
                                  ()=>{

            m_backup.SplashRadius+=1;

            return (m_champ.m_creatureProperty.SplashRadius) + " -> " + "<color=yellow>" + (m_backup.SplashRadius) + "m</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.SplashRadius+=1;

            --m_champ.RemainStatPoint;
        },
        ()=>{
            switch(m_champ.WeaponHolder.MainWeapon.RefWeaponItem.id)
            {
            case Const.ChampLightningLauncherRefItemId:
            case Const.ChampFiregunRefItemId:
            case Const.ChampGunRefItemId:
            case Const.ChampBoomerangLauncherRefItemId:
                return false;
            case Const.ChampGuidedRocketLauncherRefItemId:
            case Const.ChampRocketLauncherRefItemId:
                return true;
            }

            return false;
        }
        ));

        utilAbili.Add(new Ability(0.3f, "Flamethrower Length",
                                  ()=>{

            m_backup.BulletAlphaLength+=0.25f;

            return (m_champ.m_creatureProperty.BulletLength) + " -> " + "<color=yellow>" + (m_backup.BulletLength) + "m</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.BulletAlphaLength+=0.25f;

            --m_champ.RemainStatPoint;
        },
        ()=>{
            if (m_champ.m_creatureProperty.BulletLength >= 1f)
                return false;

            switch(m_champ.WeaponHolder.MainWeapon.RefWeaponItem.id)
            {
            case Const.ChampFiregunRefItemId:
                return true;
            case Const.ChampLightningLauncherRefItemId:
            case Const.ChampGunRefItemId:
            case Const.ChampBoomerangLauncherRefItemId:
            case Const.ChampGuidedRocketLauncherRefItemId:
            case Const.ChampRocketLauncherRefItemId:
                return false;
            }

            return false;
        }
        ));

        utilAbili.Add(new Ability(0.3f, "Followers On Summoning",
                                  ()=>{

            m_backup.CallableFollowers+=1;

            return (m_champ.m_creatureProperty.CallableFollowers) + " -> " + "<color=yellow>" + (m_backup.CallableFollowers) + "</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.CallableFollowers+=1;

            --m_champ.RemainStatPoint;
        },
        ()=>{
            for(int i = 0; i < m_champ.AccessoryItems.Length; ++i)
            {
                if (m_champ.AccessoryItems[i] != null &&
                    m_champ.AccessoryItems[i].Item.RefItem.type == ItemData.Type.Follower &&
                    m_champ.m_creatureProperty.CallableFollowers < Const.MaxCallableFollowers
                    )
                    return true;
            }
            return false;
        }
        ));

        utilAbili.Add(new Ability(0.3f, "Gain Extra XP",
                                  ()=>{
            m_backup.GainExtraExp += 0.5f;
            return (m_champ.m_creatureProperty.GainExtraExp*100) + " -> " + "<color=yellow>" + (m_backup.GainExtraExp*100) + "%</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.GainExtraExp += 0.5f;
            --m_champ.RemainStatPoint;
        }));

        utilAbili.Add(new Ability(0.3f, "Gain Extra Gold",
                                  ()=>{
            m_backup.GainExtraGold += 0.5f;
            return (m_champ.m_creatureProperty.GainExtraGold*100) + " -> " + "<color=yellow>" + (m_backup.GainExtraGold*100) + "%</color>";
        },
        ()=>{
            m_champ.m_creatureProperty.GainExtraGold += 0.5f;
            --m_champ.RemainStatPoint;
        }));

        m_abilities.Add(AbilityCategory.ChampStat, basicAbili);
        m_abilities.Add(AbilityCategory.Skill, skillAbili);
        m_abilities.Add(AbilityCategory.Weapon, utilAbili);

        for(int i = 0; i < m_statButtons.Length; ++i)
            m_statButtons[i] = new YGUISystem.GUIButton(transform.Find("StatButton"+i).gameObject, ()=>{return true;});

        m_remainPointText = new YGUISystem.GUILable(transform.Find("Text/RemainPointText").gameObject);

        m_rollButton = new YGUISystem.GUIPriceButton(transform.Find("RollingButton").gameObject, Const.StartPosYOfPriceButtonImage, ()=>{
            return m_champ.RemainStatPoint > 0;
        });
        m_rollButton.Prices = RefData.Instance.RefItems[Const.RandomAbilityRefItemId].levelup.conds;

        transform.Find("RollingButton").gameObject.SetActive(Cheat.EnableAbilityRollButton);
        #if UNITY_EDITOR
        if (Const.CHEAT_MODE)
        {
            transform.Find("RollingButton").gameObject.SetActive(true);
        }
        #endif

        RandomAbility(!AutoAssigned);

        AutoAssignedAbillity();
    }
예제 #9
0
 void Start()
 {
     m_close = new YGUISystem.GUILable(transform.Find("CloseButton/Text").gameObject);
     m_close.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Close);
 }
예제 #10
0
    void Start()
    {
        m_start = new YGUISystem.GUILable(transform.Find("MainPanel/ButtonStart/Text").gameObject);
        m_leadderBoard = new YGUISystem.GUILable(transform.Find("MainPanel/ButtonLeaderBoard/Text").gameObject);

        m_start.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Start);
        m_leadderBoard.Text.text = RefData.Instance.RefTexts(MultiLang.ID.LeaderBoard);

        Const.HideLoadingGUI();
    }
예제 #11
0
    private void Start()
    {
        m_needGems = new YGUISystem.GUILable(transform.Find("NeedGems/Text").gameObject);

        Init();
    }
예제 #12
0
    void Start()
    {
        string[] dir = {"Contents/Strength",
                        "Contents/RegenSP",
                        "Contents/GainExtraGold",
                        "Contents/DamageReduction",
                        "Contents/DamageMultiplier",
                        "Contents/CriticalChance",
                        "Contents/CriticalDamage",
                        "Contents/TapDamage",
                        "Contents/LifeSteal",
            "Contents/Dodge",
            "Contents/StatisticsDealDmgPS",
            "Contents/StatisticsTakenDmgPS",
            "Contents/StatisticsKillPS",
            "Contents/StatisticsConsumedSPPS",
            "Contents/StatisticsWave",
                    };
        transform.Find(dir[(int)DirIndex.Strength]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.Strength) + ":";
        transform.Find(dir[(int)DirIndex.RegenSP]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.RegenSP) + ":";
        transform.Find(dir[(int)DirIndex.GainExtraGold]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.GainExtraGold) + ":";
        transform.Find(dir[(int)DirIndex.DamageReduction]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.Deffence) + ":";
        transform.Find(dir[(int)DirIndex.DamageMultiplier]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.DamageMultiplier) + ":";
        transform.Find(dir[(int)DirIndex.CriticalChance]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.CriticalChance) + ":";
        transform.Find(dir[(int)DirIndex.CriticalDamage]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.CriticalDamage) + ":";
        transform.Find(dir[(int)DirIndex.TapDamage]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.TapDamage) + ":";
        transform.Find(dir[(int)DirIndex.LifeSteal]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.LifeSteal) + ":";
        transform.Find(dir[(int)DirIndex.Dodge]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.Dodge) + ":";
        transform.Find(dir[(int)DirIndex.StatisticsDealDmgPS]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.DealDmgPerSec) + ":";
        transform.Find(dir[(int)DirIndex.StatisticsTakenDmgPS]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.TakenDmgPerSec) + ":";
        transform.Find(dir[(int)DirIndex.StatisticsKillPS]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.KillMobs) + ":";
        transform.Find(dir[(int)DirIndex.StatisticsConsumedSPPS]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.ConsumeSPPerSec) + ":";
        transform.Find(dir[(int)DirIndex.StatisticsWave]).GetComponent<Text>().text = RefData.Instance.RefTexts(MultiLang.ID.Wave) + ":";

        m_strength =  new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.Strength]+"/Text").gameObject);
        m_regenSP = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.RegenSP]+"/Text").gameObject);
        m_gainExtraGold = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.GainExtraGold]+"/Text").gameObject);
        m_damageReduction = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.DamageReduction]+"/Text").gameObject);
        m_damageMultiplier = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.DamageMultiplier]+"/Text").gameObject);
        m_criticalChance = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.CriticalChance]+"/Text").gameObject);
        m_criticalDamage = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.CriticalDamage]+"/Text").gameObject);
        m_tapDamage = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.TapDamage]+"/Text").gameObject);
        m_lifeSteal = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.LifeSteal]+"/Text").gameObject);
        m_dodge = new YGUISystem.GUILable(transform.Find(dir[(int)DirIndex.Dodge]+"/Text").gameObject);

        m_guages[0] = new YGUISystem.GUIGuage(transform.Find(dir[(int)DirIndex.StatisticsDealDmgPS]+"/Guage/Guage").gameObject,
                                              ()=>{
            if (Warehouse.Instance.NewGameStats.DealDamagePerSec == 0)
                return 0f;
            return Warehouse.Instance.NewGameStats.DealDamagePerSec/Warehouse.Instance.NewGameStats.MaxDealDamagePerSec;
        },
        ()=>{
            if (Warehouse.Instance.NewGameStats.MaxDealDamagePerSec == 0)
                return 0 + " / " + 0;

            return System.String.Format("{0:F2} / {1}",Warehouse.Instance.NewGameStats.DealDamagePerSec, Warehouse.Instance.NewGameStats.MaxDealDamagePerSec);
        }
        );

        m_guages[1] = new YGUISystem.GUIGuage(transform.Find(dir[(int)DirIndex.StatisticsTakenDmgPS]+"/Guage/Guage").gameObject,
                                              ()=>{
            if (Warehouse.Instance.NewGameStats.TakenDamagePerSec == 0)
                return 0f;
            return Warehouse.Instance.NewGameStats.TakenDamagePerSec/Warehouse.Instance.NewGameStats.MaxTakenDamagePerSec;
        },
        ()=>{
            if (Warehouse.Instance.NewGameStats.MaxTakenDamagePerSec == 0)
                return 0 + " / " + 0;

            return System.String.Format("{0:F2} / {1}",Warehouse.Instance.NewGameStats.TakenDamagePerSec, Warehouse.Instance.NewGameStats.MaxTakenDamagePerSec);
        }
        );

        m_guages[2] = new YGUISystem.GUIGuage(transform.Find(dir[(int)DirIndex.StatisticsKillPS]+"/Guage/Guage").gameObject,
                                              ()=>{
            if (Warehouse.Instance.GameBestStats.KilledMobs == 0)
                return 0f;
            return (float)(Warehouse.Instance.NewGameStats.KilledMobs)/Warehouse.Instance.GameBestStats.KilledMobs;
        },
        ()=>{
            if (Warehouse.Instance.GameBestStats.KilledMobs == 0)
                return 0 + " / " + 0;

            return System.String.Format("{0} / {1}",Warehouse.Instance.NewGameStats.KilledMobs, Warehouse.Instance.GameBestStats.KilledMobs);
        }
        );

        m_guages[3] = new YGUISystem.GUIGuage(transform.Find(dir[(int)DirIndex.StatisticsConsumedSPPS]+"/Guage/Guage").gameObject,
                                              ()=>{
            if (Warehouse.Instance.NewGameStats.ConsumedSPPerSec == 0)
                return 0f;
            return Warehouse.Instance.NewGameStats.ConsumedSPPerSec/Warehouse.Instance.NewGameStats.MaxConsumedSPPerSec;
        },
        ()=>{
            if (Warehouse.Instance.NewGameStats.MaxConsumedSPPerSec == 0)
                return 0 + " / " + 0;

            return System.String.Format("{0:F2} / {1}",Warehouse.Instance.NewGameStats.ConsumedSPPerSec, Warehouse.Instance.NewGameStats.MaxConsumedSPPerSec);
        }
        );

        m_guages[4] = new YGUISystem.GUIGuage(transform.Find(dir[(int)DirIndex.StatisticsWave]+"/Guage/Guage").gameObject,
                                              ()=>{
            if (Warehouse.Instance.GameBestStats.WaveIndex == 0)
                return 1f;
            return (float)(Warehouse.Instance.NewGameStats.WaveIndex+1)/(Warehouse.Instance.GameBestStats.WaveIndex+1);
        },
        ()=>{
            if (Warehouse.Instance.GameBestStats.WaveIndex == 0)
                return "1 / 1";
            return (Warehouse.Instance.NewGameStats.WaveIndex+1).ToString() + " / " + (Warehouse.Instance.GameBestStats.WaveIndex+1).ToString();
        }
        );
    }
예제 #13
0
    void Start()
    {
        m_level = new YGUISystem.GUILable(transform.Find("Level/Text").gameObject);
        m_gold = transform.Find("Gold/RawImage/Text").gameObject.GetComponent<ComboGUIShake>();
        m_goldMedal = transform.Find("GoldMedal/RawImage/Text").gameObject.GetComponent<ComboGUIShake>();
        m_mobKills = transform.Find("Kills/RawImage/Text").gameObject.GetComponent<ComboGUIShake>();
        m_gem = transform.Find("Gem/RawImage/Text").gameObject.GetComponent<ComboGUIShake>();
        m_dna = transform.Find("DNA/RawImage/Text").gameObject.GetComponent<ComboGUIShake>();

        m_autoEarnButton = new YGUISystem.GUIButton(transform.Find("Special/AutoEarnButton").gameObject, ()=>{
            m_autoEarnButton.Lable.Text.text = Warehouse.Instance.AutoEarnGold.ToString();
            return Warehouse.Instance.AutoEarnGold > 0;
        });

        assignSkillButton(0, Warehouse.Instance.FindItem(21), ()=>{
            return Warehouse.Instance.FindItem(21).Item.Use(m_champ);
        });

        assignSkillButton(1, Warehouse.Instance.FindItem(22), ()=>{
            if (Warehouse.Instance.FindItem(22).Item.Use(m_champ))
            {
                m_champ.Followers.ForEach((Creature follower)=>{
                    Warehouse.Instance.FindItem(22).Item.Use(follower);
                });
                return true;
            }
            return false;
        });

        assignSkillButton(2, Warehouse.Instance.FindItem(23), ()=>{
            return Warehouse.Instance.FindItem(23).Item.Use(m_champ);
        });

        assignSkillButton(3, Warehouse.Instance.FindItem(24), ()=>{
            if (Warehouse.Instance.FindItem(24).Item.Use(m_champ))
            {
                m_champ.Followers.ForEach((Creature follower)=>{
                    Warehouse.Instance.FindItem(24).Item.Use(follower);
                });
                return true;
            }
            return false;
        });

        assignSkillButton(4, Warehouse.Instance.FindItem(25), ()=>{
            return Warehouse.Instance.FindItem(25).Item.Use(m_champ);
        });

        m_guages[0] = new YGUISystem.GUIGuage(transform.Find("Guage/HP").gameObject,
            ()=>{return m_champ.m_creatureProperty.getHPRemainRatio();},
            ()=>{return Mathf.FloorToInt(m_champ.m_creatureProperty.HP).ToString() + " / " + Mathf.FloorToInt(m_champ.m_creatureProperty.MaxHP).ToString();
            }
        );

        m_guages[1] = new YGUISystem.GUIGuage(transform.Find("Guage/XP").gameObject,
            ()=>{return m_champ.m_creatureProperty.getExpRemainRatio();},
            ()=>{return Mathf.FloorToInt(m_champ.m_creatureProperty.Exp).ToString() + " / " + Mathf.FloorToInt(m_champ.m_creatureProperty.MaxExp).ToString();
            }
        );

        m_guages[2] = new YGUISystem.GUIGuage(transform.Find("Guage/SP").gameObject,
            ()=>{return m_champ.m_creatureProperty.getSPRemainRatio();},
            ()=>{return Mathf.FloorToInt(m_champ.m_creatureProperty.SP).ToString() + " / " + Mathf.FloorToInt(m_champ.m_creatureProperty.MaxSP).ToString();
            }
        );

        m_guages[3] = new YGUISystem.GUIGuage(transform.Find("Guage/Shield").gameObject,
                                              ()=>{return 1f;},
        ()=>{return m_champ.m_creatureProperty.Shield.ToString();
        }
        );
    }
예제 #14
0
    void Start()
    {
        m_button = new YGUISystem.GUIButton(transform.Find("Button").gameObject, ()=>{
            return true;
        });

        m_oldEvolution = new YGUISystem.GUILable(transform.Find("Button/Old/EvolutionText").gameObject);
        m_newEvolution = new YGUISystem.GUILable(transform.Find("Button/New/EvolutionText").gameObject);

        m_oldDamage = new YGUISystem.GUILable(transform.Find("Button/Old/DamageText").gameObject);
        m_newDamage = new YGUISystem.GUILable(transform.Find("Button/New/DamageText").gameObject);

        m_evolutionLable = new YGUISystem.GUILable(transform.Find("Button/EvolutionLable").gameObject);
        m_damageLable = new YGUISystem.GUILable(transform.Find("Button/DamageLable").gameObject);

        m_evolutionLable.Text.text = RefData.Instance.RefTexts(MultiLang.ID.EvolutionLevel);
        m_damageLable.Text.text = RefData.Instance.RefTexts(MultiLang.ID.BaseDamage);
    }