void Log(Cell.Transform transform) { print(string.Format( "{0}( T: {1}, R: {2}, S: {3}, C: {4} )", transform.node.name, transform.position, transform.rotation, transform.scale, transform.children.Count )); }
void Start() { parent = new Node(parentArgs.name).transform; children = new Cell.Transform[childArgs.Length]; for (var c = 0; c < childArgs.Length; c++) { var args = childArgs[c]; var node = new Node(args.name); node.transform.SetParent(parent); var shape = node.AddBehavior(new MeshShape(Mesh2.square)); shape.CreateView(args.color); children[c] = node.transform; } }
public static Quaternion GetUnityRotation(this Cell.Transform transform) { return(Quaternion.Euler(0, 0, (float)(transform.rotation * Vec2.rad2deg))); }