Apply VS suggestion for refactoring TextureRef.Get
GitOrigin-RevId: 9758a333c456f6a150282d3f4adb00c68095e416
This commit is contained in:
parent
26649ce20d
commit
f081a3db4e
@ -15,19 +15,16 @@ namespace SemiColinGames {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private readonly string contentPath;
|
private readonly string contentPath;
|
||||||
private Texture2D texture;
|
|
||||||
|
|
||||||
public TextureRef(string contentPath) {
|
public TextureRef(string contentPath) {
|
||||||
allTextures.Add(this);
|
allTextures.Add(this);
|
||||||
this.contentPath = contentPath;
|
this.contentPath = contentPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Texture2D Get {
|
public Texture2D Get { get; private set; }
|
||||||
get { return texture; }
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Load(ContentManager content) {
|
private void Load(ContentManager content) {
|
||||||
texture = content.Load<Texture2D>(contentPath);
|
Get = content.Load<Texture2D>(contentPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user