Ejemplo n.º 1
0
    void Update()
    {
        if (isactive)
        {
            if (TL_TimeLineMng.ctime == 0)
            {
                TL_TimeLineMng.run(true);
            }
            if (Input.GetKeyDown(KeyCode.Q))
            {
                foreach (var b in CharList)
                {
                    Debug.Log(Cam.WorldToViewportPoint(b.transform.position).ToString("F4"));
                }
            }



            CamMovement();


            zoom();
            EffectOffset.z         = 0;
            Cam.transform.position = IntendedCoords + (EffectOffset * EffectMult);
            Cam.transform.position = new Vector3(Cam.transform.position.x, Cam.transform.position.y, -10);
        }
    }
Ejemplo n.º 2
0
    IEnumerator ChangeState(States tgt)
    {
        float k = 1;

        while (k > 0)
        {
            k -= Time.deltaTime * 4;
            fademat.SetFloat("_Fade", k);
            yield return(null);
        }
        TL_TimeLineMng.ResetTimer();
        TL_TimeLineMng.run(false);
        yield return(new WaitForSeconds(0.5f));

        if (tgt == States.end)
        {
            SceneManager.LoadScene("Selection");
        }
        if (tgt == States.Replay)
        {
            yield return(new WaitForSeconds(1.0f));
        }
        state = tgt;

        while (k < 1)
        {
            k += Time.deltaTime * 4;
            fademat.SetFloat("_Fade", k);
            yield return(null);
        }
        fading = false;
    }
Ejemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Q))
     {
         AdvanceScene();
     }
     if (Input.GetKeyDown(KeyCode.E))
     {
         RestartScene();
     }
     if (state == States.Replay && !fading)
     {
         TL_TimeLineMng.run(true);
     }
 }
Ejemplo n.º 4
0
    void Ready()
    {
        TakeCount.text  = "テイク " + (stateManagerref.Takes + 1).ToString();
        SceneCount.text = "シーン " + stateManagerref.Actors + "/" + (stateManagerref.CurrentActor + 1).ToString();


        if (Input.GetKey(KeyCode.Space))
        {
            rot = smin(rot + rotrate, rotmax, smooth);
            //   Debug.Log(rot);
        }
        else
        {
            rot -= rotrate * 4.0f;
            rot  = Math.Max(rot, 0);
        }
        if (rot > rotmax / 4)
        {
            set = true;
        }
        if (rot < 0.05f && set && MG_StateManager.state == MG_StateManager.States.Ready)
        {
            aa.Play();
            //  Debug.Log("cir");
            set = false;
            FindObjectOfType <CAM_Gameplay>().Ready_to_GP();
            TL_TimeLineMng.run(true);
        }


        //   T.localScale+=lerp(T.localScale,ReadySize,Speed);
        //   T.position+=lerp(T.position,ReadyPos,Speed);
        if (Input.GetKeyDown(KeyCode.K))
        {
            MG_StateManager.state = MG_StateManager.States.Gameplay;
        }
        Top_T.rotation = Quaternion.Euler(0, 0, -rot);
    }
Ejemplo n.º 5
0
    public void RestartScene()
    {
        Debug.Log("aaa");
        if (!fading)
        {
            fading = true;
            CharacterOrder[CurrentActor].HardReset();

            foreach (var b in CharacterOrder)
            {
                b.ResetInput();
                b.completed = false;
            }


            PC_Control.TargetTL.EventList.Clear();
            //        TL_TimeLineMng.ResetTimer();
            StartCoroutine(ChangeState(States.Ready));
            Takes += 1;

            TL_TimeLineMng.run(false);
        }
    }