Exemplo n.º 1
0
    // Use this for initialization
    void Awake()
    {
        string FileName = Application.persistentDataPath + "/myCash";

        if (System.IO.File.Exists(FileName))
        {
            return;
        }
        else
        {
            myCashJS mj = new myCashJS();
            myLevel  m1 = new myLevel("1");
            myLevel  m2 = new myLevel("2");
            myLevel  m3 = new myLevel("3");
            myLevel  m4 = new myLevel("4");
            myLevel  m5 = new myLevel("5");
            myLevel  m6 = new myLevel("6");
            myLevel  m7 = new myLevel("7");
            myLevel  m8 = new myLevel("8");

            mj.Save(0);

            m1.Save(0);
            m2.Save(0);
            m3.Save(0);
            m4.Save(0);
            m5.Save(0);
            m6.Save(0);
            m7.Save(0);
            m8.Save(0);
        }
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        myCashJS lj = new myCashJS();

        lj.Load();
        t      = GameObject.Find("Cash").GetComponent <Text>();
        t.text = lj.load.cash.ToString();
    }
Exemplo n.º 3
0
 public void run()
 {
     if (sl.value >= maxtime)
     {
         sl.value = 0;
         myLevel ml = new myLevel(num);
         ml.Load();
         myCashJS mc = new myCashJS();
         mc.Load();
         mc.load.cash += ml.load.Level;
         mc.Save(mc.load.cash);
     }
     sl.value += 0.01f;
 }
Exemplo n.º 4
0
    public void save()
    {
        myCashJS lj = new myCashJS();

        lj.Load();
        myLevel ml = new myLevel("1");

        ml.Load();
        num        = ml.load.Level + 1;
        this.cash  = lj.load.cash;
        this.cash += num;

        lj.Save(this.cash);
    }
Exemplo n.º 5
0
    public void upgrade()
    {
        myLevel ml = new myLevel(num); //搜尋目前等級

        ml.Load();
        myCashJS mc = new myCashJS();

        mc.Load();
        Assets.C_.Character.Convert con = new Assets.C_.Character.Convert();
        mc.load.cash -= con.cash(ml.load.Level);
        mc.Save(mc.load.cash);
        int level = ml.load.Level;

        level++;
        ml.Save(level);
        SetStatus s1 = new SetStatus();

        s1.Set(num);

        //  UpDecide up = new UpDecide();//調整點擊變數
        //  up.upgrade();
    }
Exemplo n.º 6
0
    public void justtry()
    {
        myCashJS mj = new myCashJS();
        myLevel  m1 = new myLevel("1");
        myLevel  m2 = new myLevel("2");
        myLevel  m3 = new myLevel("3");
        myLevel  m4 = new myLevel("4");
        myLevel  m5 = new myLevel("5");
        myLevel  m6 = new myLevel("6");
        myLevel  m7 = new myLevel("7");
        myLevel  m8 = new myLevel("8");

        mj.Save(0);

        m1.Save(0);
        m2.Save(0);
        m3.Save(0);
        m4.Save(0);
        m5.Save(0);
        m6.Save(0);
        m7.Save(0);
        m8.Save(0);
    }