예제 #1
0
        public virtual void Update(float fDeltaTime)
        {
            m_fLiveTime += fDeltaTime;
            foreach (Button b in m_Buttons)
            {
                // If the button is enabled, the mouse is pointing to it, and the UI is the top one
                if (b.Enabled && b.m_Bounds.Contains(InputManager.Get().MousePosition) &&
                    GameState.Get().GetCurrentUI() == this)
                {
                    b.HasFocus = true;
                }
                else
                {
                    b.HasFocus = false;
                }
            }

            foreach (SongButton sb in m_SongButtons)
            {
                // If the button is enabled, the mouse is pointing to it, and the UI is the top one
                if (sb.Enabled && sb.m_Bounds.Contains(InputManager.Get().MousePosition) &&
                    GameState.Get().GetCurrentUI() == this)
                {
                    sb.HasFocus = true;
                }
                else
                {
                    sb.HasFocus = false;
                }
            }

            m_Timer.Update(fDeltaTime);
        }
    private void Update()
    {
        toggleStateTimer.Update();

        var playerDistance = 10000.0f;

        foreach (var playerController in GameManager.Instance.Players)
        {
            var distance = (playerController.transform.position - transform.position).magnitude;
            playerDistance = distance < playerDistance ? distance : playerDistance;
        }

        animator.SetFloat("PlayerDistance", playerDistance);
    }
예제 #3
0
    private void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            bulletTimer.Start();
        }

        if (Input.GetMouseButtonUp(0))
        {
            bulletTimer.Stop();
        }

        if (Input.GetMouseButton(0))
        {
            bulletTimer.Update();
        }
    }
예제 #4
0
        static int _m_Update(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            Utils.Timer __cl_gen_to_be_invoked = (Utils.Timer)translator.FastGetCSObj(L, 1);


            try {
                {
                    float deltaTime = (float)LuaAPI.lua_tonumber(L, 2);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.Update(deltaTime);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
예제 #5
0
 private void Update()
 {
     secondsTimer.Update();
     nightScreenTimer.Update();
 }
예제 #6
0
 private void Update()
 {
     targetIncrementTimer.Update();
 }
예제 #7
0
 public void Update() => gameoverTimer.Update();
예제 #8
0
 private void Update() => spawnTimer.Update();