public ShaderPhysicsObject(int index0, ShaderPhysics global0) { index = index0; global = global0; UpdateParents(); go = GameObject.CreatePrimitive(PrimitiveType.Sphere); go.transform.parent = global.dataManager.parentObjectsGo.transform; go.transform.position = global.miscManager.GetRandomObjectPos(); float s = global.dataManager.objectScale; go.transform.localScale = new Vector3(s, s, s); float yaw = Random.Range(0, 360f); go.transform.Rotate(0, yaw, 0); // cam = go.AddComponent <Camera>(); RenderTexture renderTexture = new RenderTexture(global.dataManager.resCam, global.dataManager.resCam, 16, RenderTextureFormat.ARGB32); cam.targetTexture = renderTexture; cam.targetTexture.filterMode = FilterMode.Point; cam.nearClipPlane = .1f; cam.cullingMask &= ~(1 << LayerMask.NameToLayer(global.dataManager.layerHidden)); // displayTexture = new Texture2D(global.dataManager.resCam, global.dataManager.resCam); displayGo = GameObject.CreatePrimitive(PrimitiveType.Quad); displayGo.transform.parent = global.dataManager.parentTargetsGo.transform; displayGo.transform.localScale = new Vector3(10, 10, 10); displayGo.transform.eulerAngles = new Vector3(0, 0, 0); displayGo.GetComponent <Renderer>().material.mainTexture = displayTexture; // pointerGo = GameObject.CreatePrimitive(PrimitiveType.Cube); pointerGo.transform.parent = global.dataManager.parentObjectsGo.transform; // targetGo = GameObject.CreatePrimitive(PrimitiveType.Sphere); targetGo.layer = LayerMask.NameToLayer(global.dataManager.layerHidden); targetGo.transform.parent = global.dataManager.parentTargetsGo.transform; targetGo.transform.localScale = new Vector3(1, 1, 1); // lookGo = GameObject.CreatePrimitive(PrimitiveType.Sphere); lookGo.layer = LayerMask.NameToLayer(global.dataManager.layerHidden); lookGo.transform.parent = global.dataManager.parentTargetsGo.transform; lookGo.transform.localScale = new Vector3(1, 1, 1); lookGo.GetComponent <Renderer>().material.color = Color.cyan; // go.name = "object"; }
public ShaderPhysicsTrails(ShaderPhysics global0) { global = global0; }
public ShaderPhysicsBars(ShaderPhysics global0) { global = global0; }
public ShaderPhysicsMisc(ShaderPhysics globals0) { global = globals0; }
public ShaderPhysicsMesh(ShaderPhysics global0) { global = global0; }