namespace refactor & progress on texture atlas
This commit is contained in:
@@ -6,15 +6,13 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Utilities.DataTypes
|
||||
namespace RecrownedAthenaeum.DataTypes
|
||||
{
|
||||
public class NinePatch
|
||||
{
|
||||
public Color color;
|
||||
readonly Texture2D texture;
|
||||
readonly int a, b, c, d;
|
||||
private Rectangle sourceRectangle;
|
||||
private Rectangle drawnRectangle;
|
||||
|
||||
/// <summary>
|
||||
/// A nine patch object.
|
||||
@@ -39,6 +37,9 @@ namespace RhythmBullet.Utilities.DataTypes
|
||||
|
||||
public void Draw(SpriteBatch batch, Rectangle destination)
|
||||
{
|
||||
Rectangle sourceRectangle;
|
||||
Rectangle drawnRectangle;
|
||||
|
||||
//1x1
|
||||
drawnRectangle.X = destination.X;
|
||||
drawnRectangle.Y = destination.Y;
|
||||
|
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Utilities.DataTypes
|
||||
namespace RecrownedAthenaeum.DataTypes
|
||||
{
|
||||
public class Resolution : IComparable<Resolution>
|
||||
{
|
||||
|
22
Recrowned-Athenaeum/DataTypes/TextureAtlas.cs
Normal file
22
Recrowned-Athenaeum/DataTypes/TextureAtlas.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Recrowned_Athenaeum.DataTypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;23
|
||||
|
||||
namespace RecrownedAthenaeum.DataTypes
|
||||
{
|
||||
public class TextureAtlas
|
||||
{
|
||||
private TextureAtlasRegion[] textureRegions;
|
||||
|
||||
public TextureAtlas(TextureAtlasRegion[] textureRegions)
|
||||
{
|
||||
this.textureRegions = textureRegions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
19
Recrowned-Athenaeum/DataTypes/TextureAtlasRegion.cs
Normal file
19
Recrowned-Athenaeum/DataTypes/TextureAtlasRegion.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Recrowned_Athenaeum.DataTypes
|
||||
{
|
||||
public struct TextureAtlasRegion
|
||||
{
|
||||
string name;
|
||||
Rectangle bounds;
|
||||
Vector2 origin;
|
||||
bool ninePatch;
|
||||
int a, b, c, d;
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user