示例#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");
        }