Exemplo n.º 1
0
 public GameObject(SerializationInfo info, StreamingContext cntxt)
 {
     SlatedToRemove = (bool) info.GetValue("GameObject_SlatedToRemove", typeof(bool));
     bounds = (Bounds) info.GetValue("GameObject_Bounds", typeof(Bounds));
     sprite = GameScreen.sprEntities[(EntitySpriteId) info.GetValue("GameObject_EntitySpriteId", typeof(EntitySpriteId))].Clone();
     isOnFloor = (bool) info.GetValue("GameObject_IsOnFloor", typeof(bool));
 }
Exemplo n.º 2
0
 public GameObject(Sprite s, int x, int y, int width=TileMap.SPRITE_SIZE, int height=TileMap.SPRITE_SIZE)
 {
     sprite = s;
     bounds = new Bounds(x, y, width, height);
     isOnFloor = true;
 }