private static UIPanelMaterialPropertyBlock.Node NewNode(UIPanelMaterialPropertyBlock block, int prop, ref Color value) { UIPanelMaterialPropertyBlock.Node node = UIPanelMaterialPropertyBlock.NewNode(block, prop, UIPanelMaterialPropertyBlock.PropType.Color); [email protected] = value.r; [email protected] = value.g; [email protected] = value.b; [email protected] = value.a; return(node); }
private static UIPanelMaterialPropertyBlock.Node NewNode(UIPanelMaterialPropertyBlock block, int prop, ref Vector4 value) { UIPanelMaterialPropertyBlock.Node node = UIPanelMaterialPropertyBlock.NewNode(block, prop, UIPanelMaterialPropertyBlock.PropType.Vector); [email protected] = value.x; [email protected] = value.y; [email protected] = value.z; [email protected] = value.w; return(node); }
private static UIPanelMaterialPropertyBlock.Node NewNode(UIPanelMaterialPropertyBlock block, int prop, UIPanelMaterialPropertyBlock.PropType type) { UIPanelMaterialPropertyBlock.Node node; if (UIPanelMaterialPropertyBlock.dumpCount <= 0) { node = new UIPanelMaterialPropertyBlock.Node(); } else { node = UIPanelMaterialPropertyBlock.dump; UIPanelMaterialPropertyBlock.dump = node.prev; UIPanelMaterialPropertyBlock.dumpCount = UIPanelMaterialPropertyBlock.dumpCount - 1; node.disposed = false; } node.property = prop; node.type = type; UIPanelMaterialPropertyBlock uIPanelMaterialPropertyBlock = block; int num = uIPanelMaterialPropertyBlock.count; int num1 = num; uIPanelMaterialPropertyBlock.count = num + 1; if (num1 != 0) { node.prev = block.last; node.hasPrev = true; node.next = null; node.hasNext = false; block.last = node; node.prev.next = node; node.prev.hasNext = true; } else { UIPanelMaterialPropertyBlock.Node node1 = node; UIPanelMaterialPropertyBlock.Node node2 = node1; block.last = node1; block.first = node2; int num2 = 0; bool flag = (bool)num2; node.hasPrev = (bool)num2; node.hasNext = flag; object obj = null; node2 = (UIPanelMaterialPropertyBlock.Node)obj; node.prev = (UIPanelMaterialPropertyBlock.Node)obj; node.next = node2; } return(node); }
public void AddToMaterialPropertyBlock(MaterialPropertyBlock block) { UIPanelMaterialPropertyBlock.Node node = this.first; int num = this.count; while (true) { int num1 = num; num = num1 - 1; if (num1 <= 0) { break; } switch (node.type) { case UIPanelMaterialPropertyBlock.PropType.Float: { block.AddFloat(node.property, [email protected]); break; } case UIPanelMaterialPropertyBlock.PropType.Vector: { block.AddVector(node.property, [email protected]); break; } case UIPanelMaterialPropertyBlock.PropType.Color: { block.AddColor(node.property, [email protected]); break; } case UIPanelMaterialPropertyBlock.PropType.Matrix: { block.AddMatrix(node.property, [email protected]); break; } } node = node.next; } }
public void Clear() { if (this.count > 0) { this.first.prev = UIPanelMaterialPropertyBlock.dump; UIPanelMaterialPropertyBlock.dump = this.last; if (UIPanelMaterialPropertyBlock.dumpCount > 0) { this.first.prev.next = this.first; this.first.prev.hasNext = true; this.first.hasPrev = true; } object obj = null; UIPanelMaterialPropertyBlock.Node node = (UIPanelMaterialPropertyBlock.Node)obj; this.last = (UIPanelMaterialPropertyBlock.Node)obj; this.first = node; UIPanelMaterialPropertyBlock.dumpCount = UIPanelMaterialPropertyBlock.dumpCount + this.count; this.count = 0; } }
private static UIPanelMaterialPropertyBlock.Node NewNode(UIPanelMaterialPropertyBlock block, int prop, ref Matrix4x4 value) { UIPanelMaterialPropertyBlock.Node node = UIPanelMaterialPropertyBlock.NewNode(block, prop, UIPanelMaterialPropertyBlock.PropType.Matrix); [email protected] = value.m00; [email protected] = value.m10; [email protected] = value.m20; [email protected] = value.m30; [email protected] = value.m01; [email protected] = value.m11; [email protected] = value.m21; [email protected] = value.m31; [email protected] = value.m02; [email protected] = value.m12; [email protected] = value.m22; [email protected] = value.m32; [email protected] = value.m03; [email protected] = value.m13; [email protected] = value.m23; [email protected] = value.m33; return(node); }
private static UIPanelMaterialPropertyBlock.Node NewNode(UIPanelMaterialPropertyBlock block, int prop, ref float value) { UIPanelMaterialPropertyBlock.Node node = UIPanelMaterialPropertyBlock.NewNode(block, prop, UIPanelMaterialPropertyBlock.PropType.Float); [email protected] = value; return(node); }
private static UIPanelMaterialPropertyBlock.Node NewNode(UIPanelMaterialPropertyBlock block, int prop, UIPanelMaterialPropertyBlock.PropType type) { UIPanelMaterialPropertyBlock.Node node; if (UIPanelMaterialPropertyBlock.dumpCount <= 0) { node = new UIPanelMaterialPropertyBlock.Node(); } else { node = UIPanelMaterialPropertyBlock.dump; UIPanelMaterialPropertyBlock.dump = node.prev; UIPanelMaterialPropertyBlock.dumpCount = UIPanelMaterialPropertyBlock.dumpCount - 1; node.disposed = false; } node.property = prop; node.type = type; UIPanelMaterialPropertyBlock uIPanelMaterialPropertyBlock = block; int num = uIPanelMaterialPropertyBlock.count; int num1 = num; uIPanelMaterialPropertyBlock.count = num + 1; if (num1 != 0) { node.prev = block.last; node.hasPrev = true; node.next = null; node.hasNext = false; block.last = node; node.prev.next = node; node.prev.hasNext = true; } else { UIPanelMaterialPropertyBlock.Node node1 = node; UIPanelMaterialPropertyBlock.Node node2 = node1; block.last = node1; block.first = node2; int num2 = 0; bool flag = (bool)num2; node.hasPrev = (bool)num2; node.hasNext = flag; object obj = null; node2 = (UIPanelMaterialPropertyBlock.Node)obj; node.prev = (UIPanelMaterialPropertyBlock.Node)obj; node.next = node2; } return node; }