public Chunk(string textureName, Vector2 pos, int _size) { size = _size; position = pos; objects = new List<Elements.Objects.GameObject>(); texture = Game1.ASM.GetTextureAsset(textureName); occTexture = Game1.ASM.GetTextureAsset("RedChunk"); drawRect = new Rectangle((int)(position.X - Game1.CAM.offset.X), (int)(position.Y - Game1.CAM.offset.Y), size, size); }
public void CreateTextureAsset(string name, string data, Texture2D sprite) { int i = 0; int[] vertData = new int[3]; splitData = data.Split(','); foreach (string csv in splitData) { vertData[i] = Convert.ToInt32(csv); i++; } tempTexture = new Elements.Assets.TextureAsset(name, sprite, vertData[0], vertData[1], vertData[2]); textures.Add(name, tempTexture); }