////////////////////////////////////////////////////////////////////////////// // // //Unity Functions // // // ////////////////////////////////////////////////////////////////////////////// void Start() { // meshFilter = GetComponent <MeshFilter>(); // mcBlob = new MCBlob(meshFilter); }
public mcPoint(float x, float y, float z, int px, int py, int pz, MCBlob thismcblob) { this.index = new float[3]; index[0] = x; index[1] = y; index[2] = z; this.px = px; this.py = py; this.pz = pz; this.cntr = 0; this.mcblob = thismcblob; }
public override void OnInspectorGUI() { DrawDefaultInspector(); MCBlob blob = (MCBlob)target; if (GUILayout.Button("Build Object")) { blob.BuildMesh(); } }
////////////////////////////////////////////////////////////////////////////// // // //Unity Functions // // // ////////////////////////////////////////////////////////////////////////////// void Start() { // meshFilter = GetComponent <MeshFilter>(); // mcBlob = new MCBlob(meshFilter); // uiToggle.gameObject.SetActive(true); }
// Update is called once per frame void Update() { if (transform.position.y <= -10) { MCBlob blob = FindObjectOfType <MCBlob>(); SphereCollider sphereCollider = GetComponent <SphereCollider>(); if (blob && sphereCollider) { blob.BlobObjectsLocations.Remove(sphereCollider); } Destroy(this.gameObject); } }
public override void MakeArt() { blob = GetComponent <MCBlob>(); blob.dimX = blob.dimY = blob.dimZ = resolution; blob.inBlobs = new Transform[amount]; for (int i = 0; i < amount; i++) { GameObject g = new GameObject(); g.transform.localScale = Vector3.one * .1f * Random.Range(.4f, 1f); g.transform.localPosition = Random.insideUnitSphere * .4f; g.transform.parent = root.transform; blob.inBlobs[i] = g.transform; } blob.Regen(); }
public mcPoint(float x, float y, float z, int px, int py, int pz, MCBlob thismcblob) { this.index = new float[3]; index[0] = x; index[1] = y; index[2] = z; this.px = px; this.py = py; this.pz = pz; this.cntr = 0; this.mcblob = thismcblob; }
// Use this for initialization void Start() { GameObject blobGameObject = transform.parent.gameObject; blobs = blobGameObject.GetComponent <MCBlob>(); }