コード例 #1
0
        public World(PassObject RESETWORLD, int LEVELID, PassObject CHANGEGAMESTATE)
        {
            stop           = 0;
            levelId        = LEVELID;
            ResetWorld     = RESETWORLD;
            ChangeWorldTwo = RESETWORLD;

            ChangeGameState = CHANGEGAMESTATE;

            levelDrawManager = new LevelDrawManager();


            GameGlobals.PassProjectile = AddProjectile;
            GameGlobals.PassEffect     = AddEffect;
            GameGlobals.PassMob        = AddMob;
            GameGlobals.PassBuilding   = AddBuilding;
            GameGlobals.PassSpawnPoint = AddSpawnPoint;
            GameGlobals.CheckScroll    = CheckScroll;
            GameGlobals.PassGold       = AddGold;

            GameGlobals.paused = false;


            offset = new Vector2(0, 0);

            LoadData(levelId);

            ui = new UI(ResetWorld);

            bkg = new TileBkg2d("2D\\UI\\Backgrounds\\KafelekPodloga", new Vector2(-100, -100), new Vector2(120, 100), new Vector2(grid.totalPhysicalDims.X, grid.totalPhysicalDims.Y));
        }
コード例 #2
0
 public virtual void UpdateDraw(Vector2 OFFSET, LevelDrawManager LEVELDRAWMANAGER)
 {
     if (drawLocId == 0 && LEVELDRAWMANAGER != null)
     {
         LEVELDRAWMANAGER.AddOrUpdateDraws(this, true);
     }
     if (DrawManagerDel != null)
     {
         DrawManagerDel(new DrawSlotUpdatePackage(OFFSET, true));
     }
 }