Exemplo n.º 1
0
 public static string GetMessage(BusterType type, bool start)
 {
     if (start)
     {
         return("START_" + type.ToString());
     }
     else
     {
         return("END_" + type.ToString());
     }
 }
Exemplo n.º 2
0
    public void BougthBuster(BusterType type, int cnt = 3)
    {
        if (!buster_storage.content.busters.ContainsKey(type))
        {
            buster_storage.content.busters.Add(type, new BusterStoreInfo(1, cnt));
        }
        else
        {
            buster_storage.content.busters[type].count += cnt;
        }

        buster_storage.Store();
    }
Exemplo n.º 3
0
    public void Init(BusterType in_type)
    {
        type = in_type;

        switch (in_type)
        {
        case BusterType.FLY:
            buster_name.text = TextManager.getText("booster_supercat_name");
            icon.sprite      = Resources.Load <Sprite>("Icon_booster_speed_up_01");
            counter          = FlyBuster.set_time_by_lvl(
                DataController.instance.buster_entity.getLevel(BusterType.FLY));
            counter_text.text = Helper.TextHelper.TimeFormatMinutes(counter);
            delta             = pb.GetComponent <RectTransform>().sizeDelta.x / counter;
            StartCoroutine(FlyUpdate());
            break;

        case BusterType.REBORN:
            buster_name.text = TextManager.getText("booster_reborn_name");
            icon.sprite      = Resources.Load <Sprite>("Icon_booster_heart_01");
            counter          = RebornBuster.set_cnt_by_lvl(
                DataController.instance.buster_entity.getLevel(BusterType.REBORN));
            counter_text.text = counter.ToString();
            delta             = pb.GetComponent <RectTransform>().sizeDelta.x / counter;
            break;

        case BusterType.MAGNIT:
            buster_name.text = TextManager.getText("booster_magnet_name");
            icon.sprite      = Resources.Load <Sprite>("Icon_booster_magnet_01");
            counter          = MagnitBuster.set_time_by_lvl(
                DataController.instance.buster_entity.getLevel(BusterType.MAGNIT));
            counter_text.text = Helper.TextHelper.TimeFormatMinutes(counter);
            delta             = pb.GetComponent <RectTransform>().sizeDelta.x / counter;
            StartCoroutine(MagnetUpdate());
            break;
        }

        float y = pb.GetComponent <RectTransform>().sizeDelta.y;

        pb.GetComponent <RectTransform>().sizeDelta =
            new Vector2(0, y);
    }
Exemplo n.º 4
0
 public int GetPrice(BusterType t)
 {
     return(upgrate_prices[t][getLevel(t)]);
 }
Exemplo n.º 5
0
 public void UpgrateBuster(BusterType type)
 {
     buster_storage.content.busters[type].level += 1;
     buster_storage.Store();
 }
Exemplo n.º 6
0
 public int getLevel(BusterType type)
 {
     return(buster_storage.content.busters[type].level);
 }
Exemplo n.º 7
0
 public void UncountBuster(BusterType type)
 {
     buster_storage.content.busters[type].count -= 1;
     buster_storage.Store();
 }
Exemplo n.º 8
0
 public Buster(BusterType type)
 {
     start_msg = "START_" + type.ToString();
     end_msg   = "END_" + type.ToString();
     b_type    = type;
 }
Exemplo n.º 9
0
 public TimableBuster(BusterType type, int time) : base(type)
 {
     life_time      = time;
     life_time_cash = time;
 }
Exemplo n.º 10
0
 public UnitBuster(BusterType type, int cnt) : base(type)
 {
     count      = cnt;
     count_cash = cnt;
 }
Exemplo n.º 11
0
 public BoosterPrize(BusterType t, int cnt)
 {
     count = cnt;
     type  = t;
 }