예제 #1
0
    public override void OnInspectorGUI()
    {
        TiledBackground background = (TiledBackground)target;

        background.BackgroundImg = (TiledBackground.BackgroundType)EditorGUILayout.EnumPopup("Background Type", background.BackgroundImg);

        // Save the changes back to the object
        EditorUtility.SetDirty(target);
    }
예제 #2
0
        public void LoadContent()
        {
            Background = new TiledBackground(AssetRepository.Instance.BushesTile);
            var player = PlayerFactory.Instance.GetPlayer(StartingPositionPlayer0);
            Camera.Instance.SetCameraTackingObject(player);
            Camera.Instance.IsTracking = true;

            //var arrow = ProjectileFactory.Instance.GetArrow();
        }
예제 #3
0
        public World(Engine.PassObject a_resetWorld, Engine.PassObject a_changeGameState)
        {
            ResetWorld      = a_resetWorld;
            ChangeGameState = a_changeGameState;

            GameGlobals.PassProjectile     = AddProjectile;
            GameGlobals.PassNpc            = AddNpc;
            GameGlobals.PassEffect         = AddEffect;
            GameGlobals.CheckScroll        = CheckScroll;
            GameGlobals.ResetScroll        = ResetScroll;
            GameGlobals.ExecuteAttack      = ExecuteAttack;
            GameGlobals.ExecuteEnemyAttack = ExecuteEnemyAttack;
            GameGlobals.GetClosestNpc      = GetClosestNpc;
            GameGlobals.paused             = false;

            _nKilled = 0;
            _offset  = new Vector2(0, 0);

            LoadData(1);

            _ui = new UI(ResetWorld, ChangeGameState);
            _tiledBackground = new TiledBackground("Assets\\UI\\blue_background", new Vector2(0, 0), new Vector2(1920, 1080), new Vector2(_grid.TotalPhysicalDims.X, _grid.TotalPhysicalDims.Y));
        }