示例#1
0
        // 若 player 不存在 不會執行.
        public void Clock()
        {
            if (Player == null || GameStatus.pause)
            {
                return;
            }

            // 所有移動中物件移到目標點.
            MovingManager.AllObjsMoveToDest();

            // update player
            if (!Player.IsDead)
            {
                var events = PlayerBind.UpdateBinded();
                foreach (var objEvent in events)
                {
                    switch (objEvent)
                    {
                    case ObjEvent.posit:
                        bufferMap.MoveForward(Player.VectorOnScenen);
                        MovingManager.AddMoving(camera, Convert(Player.VectorOnScenen));    //bug
                        break;

                    case ObjEvent.plain:
                        RebindPlayer();    //bug
                        break;
                    }
                }
            }



            bufferMap.Clock();

            littleMap.UpdateForPlayer(GlobalAsset.creaters);
        }
示例#2
0
        // 綁定物件依據 Animal 的方向移動.
        private void BindedMove()
        {
            Animal animal = (Animal)obj;

            MovingManager.AddMoving(binded, Convert(animal.VectorOnScenen));
        }