Example #1
0
        public Body(World mWorld, SSVector2I mPosition, bool mIsStatic, int mWidth, int mHeight)
        {
            World = mWorld;
            Position = mPosition;
            _isStatic = mIsStatic;
            HalfSize = new SSVector2I(mWidth/2, mHeight/2);

            Cells = new HashSet<Cell>();
            Groups = new HashSet<int>();
            GroupsToCheck = new HashSet<int>();
            GroupsToIgnoreResolve = new HashSet<int>();
        }
Example #2
0
        public SPGame()
        {
            _manager = new Manager();
            _world = new World(Groups.GroupArray, 21, 16, 16.ToUnits());
            Factory = new Factory(this, _manager, _world);

            OnUpdate += _manager.Update;
            OnUpdate += UpdateInputs;
            OnUpdate += mFrameTime => GameWindow.RenderWindow.SetTitle(((int) GameWindow.FPS).ToString());

            OnDrawBeforeCamera += () => GameWindow.RenderWindow.Clear(new Color(125, 125, 185));

            InitializeInputs();
            NewGame();
        }
Example #3
0
 public Factory(SPGame mGame, Manager mManager, World mWorld)
 {
     _game = mGame;
     _manager = mManager;
     _world = mWorld;
 }