Example #1
0
    public void ShowInfo(string type)  //타워 UI 타워소개 UI tooltip
    {
        string tooltip = string.Empty; //툴팁 초기화

        switch (type)                  //타워 타입별로 타워소개 tooltip이 달라짐
        {
        case "Fire":
            FireTower fire = towerPrefab.GetComponentInChildren <FireTower>();
            tooltip = string.Format("<color=#ffa500ff><size=1>불타워</size></color>\n공격력: {0} \n공격속도 : {1} \n디버프확률 : {2}% \n디버프 지속시간 : {3}초 \n지속데미지 : {4} \n디버프효과 : 지속시간 동안 적에게 지속데미지를 입힘", fire.Damage, fire.ProjectileSpeed, fire.Proc, fire.DebuffDuration, fire.TickDamage);
            break;

        case "Ice":
            IceTower ice = towerPrefab.GetComponentInChildren <IceTower>();

            tooltip = string.Format("<color=#00ffffff><size=1>얼음타워</size></color>\n공격력: {0} \n공격속도 : {1} \n디버프확률 : {2}% \n디버프 지속시간 : {3}초 \n둔화율 : {4}% \n디버프효과 : 지속시간 동안 적에게 둔화효과 적용", ice.Damage, ice.ProjectileSpeed, ice.Proc, ice.DebuffDuration, ice.SlowingFactor);
            break;

        case "Poison":
            PoisonTower poison = towerPrefab.GetComponentInChildren <PoisonTower>();
            tooltip = string.Format("<color=#00ff00ff><size=1>독타워</size></color>\n공격력: {0} \n공격속도 : {1} \n디버프확률 : {2}% \n표식개수(몬스터당) : {3}개 \n표식데미지 : {4} \n디버프효과 : 피해를 입은 몬스터가 지속시간동안 \n밟으면 데미지를 입히는 표식을 뿌림", poison.Damage, poison.ProjectileSpeed, poison.Proc, poison.DebuffDuration, poison.SplashDamage);
            break;

        case "Storm":
            StormTower storm = towerPrefab.GetComponentInChildren <StormTower>();
            tooltip = string.Format("<color=#add8e6ff><size=1>번개타워</size></color>\n공격력: {0} \n공격속도 : {1} \n디버프확률 : {2}% \n스턴 지속시간 : {3}초 \n디버프효과 : 지속시간 동안 적에게 스턴효과 적용 ", storm.Damage, storm.ProjectileSpeed, storm.Proc, storm.DebuffDuration);
            break;

        default:
            break;
        }
        GameManager.Instance.SetTooltipText(tooltip); // 문자열 타입을 받아 text 정정
        GameManager.Instance.ShowStats();             // 화면에 보이도록 active set
    }
Example #2
0
    /// <summary>
    /// Show infor about the tower when hovering the button
    /// </summary>
    /// <param name="type"></param>
    public void ShowInfo(string type)
    {
        string tooltip = string.Empty;

        switch (type) //Uses the towerprefab, to get the stats for the tooltip on each tower
        {
        case "Fire":
            FireTower fire = towerPrefab.GetComponentInChildren <FireTower>();
            tooltip = string.Format("<color=#ffa500ff><size=20><b>Fire</b></size></color>\nDamage: {0} \nProc: {1}%\nDebuff duration: {2}sec \nTick time: {3} sec \nTick damage: {4}\nCan apply a DOT to the target", fire.Damage, fire.Proc, fire.DebuffDuration, fire.TickTime, fire.TickDamage);
            break;

        case "Frost":
            FrostTower frost = towerPrefab.GetComponentInChildren <FrostTower>();
            tooltip = string.Format("<color=#00ffffff><size=20><b>Frost</b></size></color>\nDamage: {0} \nProc: {1}%\nDebuff duration: {2}sec\nSlowing factor: {3}%\nHas a chance to slow down the target", frost.Damage, frost.Proc, frost.DebuffDuration, frost.SlowingFactor);
            break;

        case "Poison":
            PoisonTower poison = towerPrefab.GetComponentInChildren <PoisonTower>();
            tooltip = string.Format("<color=#00ff00ff><size=20><b>Poison</b></size></color>\nDamage: {0} \nProc: {1}%\nDebuff duration: {2}sec \nTick time: {3} sec \nSplash damage: {4}\nCan apply dripping poison", poison.Damage, poison.Proc, poison.DebuffDuration, poison.TickTime, poison.SplashDamage);
            break;

        case "Storm":
            StormTower storm = towerPrefab.GetComponentInChildren <StormTower>();
            tooltip = string.Format("<color=#add8e6ff><size=20><b>Storm</b></size></color>\nDamage: {0} \nProc: {1}%\nDebuff duration: {2}sec\n Has a chance to stunn the target", storm.Damage, storm.Proc, storm.DebuffDuration);
            break;
        }

        //Shows the tooltip and shows the stats
        GameManager.Instance.SetTooltipText(tooltip);
        GameManager.Instance.ShowStats();
    }
Example #3
0
    //gets the tower type
    public void ShowInfo(string type)
    {
        string tooltip = string.Empty;

        switch (type)
        {
        case "Fire":
            FireTower fire = towerPrefab.GetComponentInChildren <FireTower>();
            tooltip = string.Format("<color=#ffa500ff><size=20><b>Fire</b></size></color>\n" +
                                    "Damage: {0} \n" +
                                    "Range: {5} \n" +
                                    "Proc: {1}%\n" +
                                    "Debuff duration: {2}sec \n" +
                                    "Tick time: {3} sec \n" +
                                    "Tick damage: {4}\n" +
                                    "Can apply a DOT to the target",
                                    fire.Damage, fire.Proc, fire.DebuffDuration, fire.TickTime, fire.TickDamage, fire.Range);
            break;

        case "Water":
            WaterTower water = towerPrefab.GetComponentInChildren <WaterTower>();
            tooltip = string.Format("<color=#00ffffff><size=20><b>Water</b></size></color>\n" +
                                    "Damage: {0}\n" +
                                    "Proc: {1}% \n" +
                                    "Debuff duration: {2}sec \n" +
                                    "Slowing factor: {3} \n" +
                                    "Has a chance to slow down the target",
                                    water.Damage, water.Proc, water.DebuffDuration, water.SlowingFactor);

            break;

        case "Poison":
            PoisonTower poison = towerPrefab.GetComponentInChildren <PoisonTower>();
            tooltip = string.Format("<color=#00ff00ff><size=20><b>Poison</b></size></color>\n" +
                                    "Damage: {0} \n" +
                                    "Proc: {1}%\n" +
                                    "Debuff duration: {2}sec \n" +
                                    "Tick time: {3} sec \n" +
                                    "Splash damage: {4}\n" +
                                    "Can apply dripping poison",
                                    poison.Damage, poison.Proc, poison.DebuffDuration, poison.TickTime, poison.SplashDamage);
            break;

        case "Earth":
            EarthTower earth = towerPrefab.GetComponentInChildren <EarthTower>();
            tooltip = string.Format("<color=#8b4513ff><size=20><b>Earth</b></size></color>\n" +
                                    "Damage: {0} \n" +
                                    "Proc: {1}%\n" +
                                    "Debuff duration: {2}sec\n" +
                                    "Has a chance to stun the target",
                                    earth.Damage, earth.Proc, earth.DebuffDuration);
            break;
        }

        GameManager.Instance.SetToolTipText(tooltip);
        GameManager.Instance.ShowStats();
    }