public void StartOverworld(Vector2 entityPosition) { if (Data.OverworldSpriteName != null && Data.OverworldSpriteName.Length > 0) { OverworldEntity = new Entity(ResourceManager.GetNewSprite(Data.OverworldSpriteName), entityPosition); } else { OverworldEntity = new Entity(ResourceManager.GetNewSkeleton(Data.OverworldSkeletonName), entityPosition); Rectangle customBoundingBox = OverworldEntity.GetBoundingBoxAt(Vector2.Zero); customBoundingBox.Height /= 4; customBoundingBox.Y += customBoundingBox.Height * 3; OverworldEntity.CustomBoundingBox = customBoundingBox; OverworldEntity.Scale = new Vector2(0.3f); } }
public void StartOverworld(Vector2 entityPosition) { if (Data.OverworldSpriteName != null && Data.OverworldSpriteName.Length > 0) OverworldEntity = new Entity(ResourceManager.GetNewSprite(Data.OverworldSpriteName), entityPosition); else { OverworldEntity = new Entity(ResourceManager.GetNewSkeleton(Data.OverworldSkeletonName), entityPosition); Rectangle customBoundingBox = OverworldEntity.GetBoundingBoxAt(Vector2.Zero); customBoundingBox.Height /= 4; customBoundingBox.Y += customBoundingBox.Height * 3; OverworldEntity.CustomBoundingBox = customBoundingBox; OverworldEntity.Scale = new Vector2(0.3f); } }