Code cleanup.
This commit is contained in:
@@ -78,7 +78,7 @@ namespace Cryville.Crtr {
|
||||
|
||||
public void Init() {
|
||||
if (Texture == null)
|
||||
throw new InvalidOperationException(); // TODO
|
||||
throw new InvalidOperationException("Missing texture");
|
||||
_frame = new Rect(Vector2.zero, Size);
|
||||
var w = _frame.width;
|
||||
var h = _frame.height;
|
||||
@@ -92,7 +92,7 @@ namespace Cryville.Crtr {
|
||||
|
||||
public void Init(int w, int h, Texture2D _base) {
|
||||
if (Texture != null)
|
||||
throw new InvalidOperationException(); // TODO
|
||||
throw new InvalidOperationException("Missing texture");
|
||||
Texture = _base;
|
||||
float x = _frame.x / w;
|
||||
float y = 1 - _frame.y / h;
|
||||
|
Reference in New Issue
Block a user