Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        if (startWish)
        {
            switch (wishCurrent)
            {
            case WishCurrent.START:
                WishStart();
                wishCurrent = WishCurrent.UPDATE;
                break;

            case WishCurrent.UPDATE:
                WishUpdate();
                wishTimer += Time.deltaTime;
                if (wishTimer >= wishTime)
                {
                    wishCurrent = WishCurrent.END;
                }
                break;

            case WishCurrent.END:
                startWish = false;
                WishEnd();
                wishTimer             = 0;
                wishCurrent           = WishCurrent.START;
                WishManager.isWishNow = false;
                break;
            }
        }
    }
Exemple #2
0
    // Start is called before the first frame update
    void Start()
    {
        wishCurrent = WishCurrent.START;
        wishTimer   = 0;

        isWishEnd = false;
        startWish = false;
    }