Beispiel #1
0
        public void FrameInit()
        {
            switch (generalObjFollowObjChange)
            {
            case GeneralObjFollowObjChange.Drag:
                getTarDelegate = GetTarOrder;
                break;

            case GeneralObjFollowObjChange.Script:
                getTarDelegate = GetTarSafeOrder;
                break;
            }
            switch (generalObjFollowState)
            {
            case GeneralObjFollowState.immediately:
                frameOrder = ImmediatelyOrder1;
                break;

            case GeneralObjFollowState.delayed:
                frameOrder = DelayedOrder1;
                break;

            case GeneralObjFollowState.monitor:
                frameOrder = MonitorOrder1;
                break;
            }
            timer = new PEIKnifer_Timer();
            timer.SetTime(delayedTime);
        }
Beispiel #2
0
    public void InitEnergy()
    {
        if (localxml[1] < AllEnergy)
        {
            if (year > localxml[2] && localxml[2] != 0)
            {
                localxml[1] = AllEnergy;
                localxml[8] = 0;
                //  GameInfoXMLCenterControl.SaveFunction();
                //  GameInfoXMLCenterControl.LoadFunction();
                order = NullFuntion;
                timer.gameObject.SetActive(false);
            }
            else
            {
                int temptime = (int)SplitTime();
                if (temptime > ((AllEnergy - 1) - localxml[1]) * addEnergytime * 60 + localxml[8])
                {
                    localxml[1] = AllEnergy;
                    localxml[8] = 0;
                    // GameInfoXMLCenterControl.SaveFunction();
                    // GameInfoXMLCenterControl.LoadFunction();
                    order = NullFuntion;
                    timer.gameObject.SetActive(false);
                }
                else
                {
                    timer.gameObject.SetActive(true);
                    localxml[1] += temptime / (addEnergytime * 60);
                    localxml[8] -= (temptime % (addEnergytime * 60));
                    // GameInfoXMLCenterControl.SaveFunction();
                    // GameInfoXMLCenterControl.LoadFunction();
                    Et.SetTime(localxml[8]);
                    order = SubTimer;
                }
            }
        }
        else
        {
            timer.gameObject.SetActive(false);

            order = NullFuntion;
        }
        transform.GetChild(0).GetComponent <Text>().text = localxml[1].ToString();
    }
Beispiel #3
0
 public void Init()
 {
     _toolNum = 0;
     _keyL    = new List <PEIKey_Origin>();
     _l       = PEIMEN_Entity.L.AddL();
     _l.AddElement(Update);
     _t = new PEIKnifer_Timer();
     _t.SetTime(1);
     flag = false;
     //_del = Step1;
     for (int i = 0; i < _key.Length; i++)
     {
         _keyL.Add(new PEIKey_Origin(_key[i].ToString(), Check));
     }
     _keyL[_key.Length - 1].A = End;
     _del = _keyL[0].Check;
     //PEIKDE.Log("Secret", "Init Done");
 }
Beispiel #4
0
    public void SubEnergy(int _index)
    {
        Et           = new PEIKnifer_Timer();
        localxml[1] -= _index;
        // GameInfoXMLCenterControl.SaveFunction();
        // GameInfoXMLCenterControl.LoadFunction();
        if (localxml[1] > (AllEnergy - 1))
        {
            timer.SetActive(false);
            order = NullFuntion;
        }
        else
        {
            if (localxml[8] == 0)
            {
                localxml[8] = addEnergytime * 60;
            }
            // InitEnergy();

            // GameInfoXMLCenterControl.SaveFunction();
            // GameInfoXMLCenterControl.LoadFunction();
            Et.SetTime(localxml[8]);
        }
    }
Beispiel #5
0
 public void InitGifts()
 {
     timer1.SetTime(t1 / gifts.transform.childCount);
     timer2.SetTime(t2 / gifts.transform.childCount);
     timer3.SetTime(t3 / gifts.transform.childCount);
 }
Beispiel #6
0
 // Use this for initialization
 #region Inherent Function
 void Start()
 {
     t = new PEIKnifer_Timer();
     t.SetTime(1f);
     flyNum = 0;
 }