Update() private method

private Update ( ) : void
return void
Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (modeInfo.lockInput)
     {
         return;
     }
     inputManager.Update();
     uiManager.Update();
     if (modeInfo.HasStartBattle())
     {
         BattleManager.Update();
     }
 }
Exemplo n.º 2
0
        protected override void Update(GameTime gameTime)
        {
            if (EndScreen.Instance.Visisble)
            {
                if (_wantFadeOut)
                {
                    EndScreen.Instance.FadeCurrent(false);
                }
            }
            else
            {
                _bm.Update((float)gameTime.ElapsedGameTime.TotalSeconds);
                Effects.Instance.Update((float)gameTime.ElapsedGameTime.TotalSeconds);
            }

            EndScreen.Instance.Update((float)gameTime.ElapsedGameTime.TotalSeconds);
            MouseAutoHider.Instance.Update((float)gameTime.ElapsedGameTime.TotalSeconds);
            _wantFadeOut = false;

            Window.Title = "Please Notice Me Triangle-Senpai! FPS: " + Convert.ToString((int)(1 / (float)gameTime.ElapsedGameTime.TotalSeconds));

            base.Update(gameTime);
        }
Exemplo n.º 3
0
    private void LogicUpdate(LogicFrame frame)
    {
        //handle frame
        if (frame.frameIdx != this.frameIdx + 1)
        {
            Debug.Log(this.frameIdx + "  " + frame.frameIdx);
            Debug.Log("zhenshu错误 丢弃");
            return;
        }

        this.frameIdx  = frame.frameIdx;
        this.LastDtime = frame.dtime;

        //Debug.Log("opt shu:" + frame.frameOpts.Count);
        //handle input
        for (int i = 0; i < frame.frameOpts.Count; i++)
        {
            FrameOpt opt = frame.frameOpts[i];
            Handle(opt);
        }


        battleMgr.Update(frame.dtime);



        //执行所有update
        for (int i = 0; i < LogicActorList.Count; i++)
        {
            LogicActorList[i].Update(frame.dtime);
        }

        //发送本机的命令
        //SendLocalOpt();

        SendAck();
    }
Exemplo n.º 4
0
 public override void Update(GameTime gameTime)
 {
     base.Update(gameTime);
     battleManager.Update(gameTime);
 }
Exemplo n.º 5
0
    public void Update()
    {
        if (PlayerObject != null)
        {
            PlayerObject.Update();
        }

        List <Character> newlyDead = new List <Character>();

        foreach (Character c in ActiveCharacters)
        {
            c.Update();

            if (!c.Alive && !c.WorldObject.gameObject.activeSelf)
            {
                newlyDead.Add(c);
            }
        }

        // bring out yer dead
        foreach (Character c in newlyDead)
        {
            if (c == PlayerObject)
            {
                continue;
            }

            c.Bury();
            ActiveCharacters.Remove(c);
        }

        if (GUI != null && GUI.InMenu)
        {
            return;
        }

        if (PlayerObject != null && PlayerObject.Alive)
        {
            if (Input.GetKeyDown(KeyCode.I))
            {
                GUI.ToggleInventory();
            }

            if (Input.GetKeyDown(KeyCode.C))
            {
                GUI.ToggleSkills();
            }

            if (Input.GetKeyDown(KeyCode.Tab))
            {
                SelectNearestMob();
            }

            if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Alpha1))
            {
                GUI.ProcessSkillClick(0);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Alpha2))
            {
                GUI.ProcessSkillClick(1);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad3) || Input.GetKeyDown(KeyCode.Alpha3))
            {
                GUI.ProcessSkillClick(2);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Alpha4))
            {
                GUI.ProcessSkillClick(3);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Alpha5))
            {
                GUI.ProcessSkillClick(4);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad6) || Input.GetKeyDown(KeyCode.Alpha6))
            {
                GUI.ProcessSkillClick(5);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Alpha7))
            {
                GUI.ProcessSkillClick(6);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Alpha8))
            {
                GUI.ProcessSkillClick(7);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad9) || Input.GetKeyDown(KeyCode.Alpha9))
            {
                GUI.ProcessSkillClick(8);
            }
            else if (Input.GetKeyDown(KeyCode.Keypad0) || Input.GetKeyDown(KeyCode.Alpha0))
            {
                GUI.ProcessSkillClick(9);
            }
        }
        BattleMan.Update();
    }