예제 #1
0
        public override void Start()
        {
            base.Start();

            AudioManager.InitPlayScene();
            //AudioManager.Load();

            //GfxManager.Load(); fatto in Game
            IsLoadingCheckpoint = false;
            IsPaused            = false;
            Player = null;

            Rect.Debug              = false;
            Circle.Debug            = false;
            PhysicsManager.RayDebug = false;

            Vector2 screenCenter = new Vector2(Game.Window.Width / 2, Game.Window.Height / 2);

            CameraManager.Init(screenCenter, screenCenter);
            CameraManager.AddCamera("GUI", 0f);

            PhysicsManager.Init();
            GuiManager.Init();
            ItemPickableManager.Init();
            BackgroundManager.Init(new Vector2(0, -158));

            GfxManager.LoadTiledMap("Assets/Tiles/level.tmx");

            // CameraManager.mainCamera.position = Player.Position;  //togliere
            CameraManager.SetTarget(Player);

            AudioManager.SetDefaultClipBackground("defaultClipBackground");
        }
예제 #2
0
 public override void Update()
 {
     if (!IsPaused)
     {
         AudioManager.Update();
         PhysicsManager.Update();
         UpdateManager.Update();
         PhysicsManager.CheckCollisions();
         TriggerManager.CheckTriggers();
         CameraManager.Update(); // si fa alla fine
         BackgroundManager.Update();
     }
     else
     {
         pause.Update();
     }
 }