示例#1
0
    void Update()
    {
        if (prevstate != MG_StateManager.state)
        {
            prevstate = MG_StateManager.state;
            SetContents(prevstate);
        }


        switch (prevstate)
        {
        case MG_StateManager.States.Ready:
            Ready();
            break;

        case MG_StateManager.States.Gameplay:
            GamePlay();
            break;

        case MG_StateManager.States.Replay:
            Replay();
            break;
        }
        SliderMat.SetFloat("_Slider", TL_TimeLineMng.ctime / TL_TimeLineMng.GetTimelim());
    }
示例#2
0
 void Start()
 {
     prevstate = MG_StateManager.States.Ready;
     T         = gameObject.transform;
     defpos    = T.localPosition;
     if (hasAC)
     {
         ac = GetComponent <Animator>();
     }
     setpos();
 }
示例#3
0
    void SetContents(MG_StateManager.States tgt)
    {
        CLearContents();
        switch (tgt)
        {
        case MG_StateManager.States.Ready:
            Setv(ReadyParent, 0, 2);
            break;

        case MG_StateManager.States.Gameplay:
            Setv(GPParent, 0, 2);
            break;

        case MG_StateManager.States.Replay:
            Setv(ReplayParent, 0, 2);
            break;
        }
    }
示例#4
0
 void setpos()
 {
     prevstate = MG_StateManager.state;
     if (prevstate == MG_StateManager.States.Ready)
     {
         if (hasAC)
         {
             ac.enabled = true;
         }
         T.localPosition = defpos;
     }
     else
     {
         if (hasAC)
         {
             ac.enabled = false;
         }
         Clapper.Setv(T, 108888888, 2);
     }
 }