상속: MonoBehaviour
예제 #1
0
    //Switches between different quick time events
    IEnumerator QuicktimeSwitcher()
    {
        int rand = Random.Range(0, 3);

        //quickTimeEvents = null;

        if (rand == 0)
        {
            if (limitFire > 0 && quickTimeEvents != CallQuickFire)
            {
                quickTimeEvents = CallQuickFire;
                //Debug.Log("Switched to quick draw.");
            }
            else if (limitFire > 0 && nbrTotal > 9)
            {
                quickTimeEvents = CallQuickFire;
            }
            else
            {
                QuicktimeSwitcher();
            }
        }
        else if (rand == 1)
        {
            if (limitSwipe > 0)
            {
                quickTimeEvents = CallSwipe;
                //Debug.Log("Switched to quick swipe.");
            }
            else
            {
                QuicktimeSwitcher();
            }
        }
        else if (rand == 2)
        {
            if (limitBuff > 0 && quickTimeEvents != CallBuff)
            {
                quickTimeEvents = CallBuff;
                //Debug.Log("Switched to quick tap.");
            }
            else if (limitBuff > 0 && nbrTotal > 9)
            {
                quickTimeEvents = CallBuff;
            }
            else
            {
                QuicktimeSwitcher();
            }
        }
        else
        {
            quickTimeEvents = null;
        }

        //Debug.Log("Random number is " + rand);
        return(quickTimeEvents());
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        StartCoroutine(BeginShow());
        StartCoroutine(RunShow());

        playerReactScript = playerObj.GetComponent <PlayerReacts>();

        uiBuff.GetComponent <QuickBuff>().desireTaps = rqrdTaps;
        uiBuff.GetComponent <QuickBuff> ().bonusTaps = bonusTaps;

        limitTotal = limitBuff + limitSwipe + limitFire;

        swipeMin = 0;
        swipeMax = 1;

        quickTimeEvents = CallBuff;

        allSwipes = new GameObject[4];

        swpBonus = swpIncr;
    }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        StartCoroutine (BeginShow());
        StartCoroutine (RunShow());

        playerReactScript = playerObj.GetComponent<PlayerReacts>();

        uiBuff.GetComponent<QuickBuff>().desireTaps = rqrdTaps;
        uiBuff.GetComponent<QuickBuff> ().bonusTaps = bonusTaps;

        limitTotal = limitBuff + limitSwipe + limitFire;

        swipeMin = 0;
        swipeMax = 1;

        quickTimeEvents = CallBuff;

        allSwipes = new GameObject[4];

        swpBonus = swpIncr;
    }
예제 #4
0
    // Init

    private void Start()
    {
        doodleAnimator  = gameObject.GetComponent <DoodleAnimator>();
        stateManager    = StateManager.Instance;
        quickTimeEvents = GameObject.FindGameObjectWithTag("Managers").GetComponent <QuickTimeEvents>();
    }
예제 #5
0
    //Switches between different quick time events
    IEnumerator QuicktimeSwitcher()
    {
        int rand = Random.Range (0, 3);
        //quickTimeEvents = null;

        if (rand == 0)
        {
            if (limitFire > 0 && quickTimeEvents != CallQuickFire)
            {
                quickTimeEvents = CallQuickFire;
                //Debug.Log("Switched to quick draw.");
            }
            else if (limitFire > 0 && nbrTotal > 9)
            {
                quickTimeEvents = CallQuickFire;
            }
            else
            {
                QuicktimeSwitcher ();
            }
        }
        else if (rand == 1)
        {
            if (limitSwipe > 0)
            {
                quickTimeEvents = CallSwipe;
                //Debug.Log("Switched to quick swipe.");
            }
            else
            {
                QuicktimeSwitcher();
            }
        }
        else if (rand == 2)
        {
            if (limitBuff > 0 && quickTimeEvents != CallBuff)
            {
                quickTimeEvents = CallBuff;
                //Debug.Log("Switched to quick tap.");
            }
            else if (limitBuff > 0 && nbrTotal > 9)
            {
                quickTimeEvents = CallBuff;
            }
            else
            {
                QuicktimeSwitcher ();
            }
        }
        else
        {
            quickTimeEvents = null;
        }

        //Debug.Log("Random number is " + rand);
        return quickTimeEvents();
    }