Prune code.

This commit is contained in:
2022-09-30 18:19:19 +08:00
parent e8e36b83bd
commit cd4ea557c3
41 changed files with 22 additions and 3592 deletions

View File

@@ -50,16 +50,7 @@ namespace Cryville.Crtr.Components {
static readonly ListPool<Vector2> _uvPool = new ListPool<Vector2>();
static readonly ArrayPool<Vector2> _shapePool = new ArrayPool<Vector2>(0x100, 0x10000);
public PolygonSGO()
: base() {
/*
SubmitProperty("head", new Property(typeof(string), () => head.frame, v => head.frame = (string)v));
SubmitProperty("body", new Property(typeof(string), () => body.frame, v => body.frame = (string)v));
SubmitProperty("tail", new Property(typeof(string), () => tail.frame, v => tail.frame = (string)v));
SubmitProperty("transparent", new Property(typeof(bool), () => transparent, v => transparent = (bool)v));
SubmitProperty("shape", new Property(typeof(Vector2[]), () => _shape, v => _shape = (Vector2[])v));
*/
public PolygonSGO() {
SubmitProperty("head", new PropOp.String(v => head.FrameName = v));
SubmitProperty("body", new PropOp.String(v => body.FrameName = v));
SubmitProperty("tail", new PropOp.String(v => tail.FrameName = v));
@@ -146,17 +137,9 @@ namespace Cryville.Crtr.Components {
lengths = _lPool.Rent();
}
/*
r = new Vector3(0, 0, 0);
Quaternion rotq = Quaternion.Euler(r);
p = prevp + rotq * (p - prevpt);
prevp = p;*/
for (int i = 0; i < _shapeLength; i++) {
Vector2 sp = r * _shape[i];
vertices.Add(p + (Vector3)sp);
// uv.Add(new Vector2(i / (shape.Length - 1), vertCount));
}
if (headGenerated) {