Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (control.EnableLongTap)
     {
         pressedTime = control.GetPlayerInput().TouchTime;
         UpdateMask();
     }
 }
Esempio n. 2
0
    IEnumerator Record()
    {
        while (gameObject != null)
        {
            int z = control.GetPlayerInput().SameTimeTap ? 1 : 0;

            Vector3 recordTmp = new Vector3(transform.position.x, transform.position.y, z);
            recordList.Add(recordTmp);
            yield return(null);
        }
    }
Esempio n. 3
0
    private void SetupStateShot()
    {
        State          state = State.Shot;
        Action <State> enter = (prev) =>
        {
            MoveIn(shotCanvas);
            blackControl.EnableShot = true;
        };
        Action update = () =>
        {
            if (blackControl.HasShot)
            {
                nextButton.SetActive(true);
            }
        };
        Action <State> exit = (next) =>
        {
            MoveOut(shotCanvas);
            nextButton.SetActive(false);
            blackControl.GetPlayerInput().ResetTouchTime();
        };

        stateMachine.Add(state, enter, update, exit);
    }
Esempio n. 4
0
    IEnumerator Spawn()
    {
        yield return(null);

        while (true)
        {
            if (control.GetPlayerInput().TouchTime < control.timeNeedDodge)
            {
                yield return(null);
            }
            else
            {
                Instantiate(bulletPrefab, transform.position, Quaternion.identity);
                yield return(new WaitForSeconds(1.5f));
            }
        }
    }