Esempio n. 1
0
    public void OnClickedIsland()
    {
        FishManager.GetInstance().Initialize();
        FishData.GetInstance().GameState = GameState.MainLoop;
        gameObject.SetActive(false);

        UIManager.GetInstance().Show("Debug");
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        float dt = Time.deltaTime;

        UIManager.GetInstance().Update(dt);
        UICommandSystem.GetInstance().Update(dt);
        if (FishData.GetInstance().GameState == GameState.MainLoop)
        {
            TimeManager.GetInstance().Update(dt);
            EventManager.GetInstance().Update(dt);
            FishManager.GetInstance().Update(dt);
        }
    }
Esempio n. 3
0
    public void Update(float dt)
    {
        if (FishData.GetInstance().GameState == GameState.MainLoop)
        {
            mEvent = GetEvent(TimeManager.GetInstance().Gametime);
            if (mEvent == null)
            {
                return;
            }
            switch (mEvent.et)
            {
            case 0:
                testseason        = true;
                mTimerTeam       += dt;
                mTimerSingleFish += dt;
                if (mTimerTeam > 5f)
                {
                    mTimerTeam = 0;
                    TestTeam();
                }
                if (mTimerSingleFish > 0.3f)
                {
                    mTimerSingleFish = 0;
                    TestOneFish();
                }
                break;

            case 1:
                if (testseason)
                {
                    TestFishSeason();
                    testseason = false;
                }

                break;

            case 2:
                break;

            default:
                break;
            }
        }
    }