コード例 #1
0
ファイル: Example_6_Runtime.cs プロジェクト: hon454/LUCY
    //////////////////////////////////////////////////////////////////////////////
    //                                                                          //
    //Unity Functions                                                           //
    //                                                                          //
    //////////////////////////////////////////////////////////////////////////////
    void Start()
    {
        //
        meshFilter = GetComponent <MeshFilter>();

        //
        mcBlob = new MCBlob(meshFilter);
    }
コード例 #2
0
        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;
        }
コード例 #3
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        MCBlob blob = (MCBlob)target;

        if (GUILayout.Button("Build Object"))
        {
            blob.BuildMesh();
        }
    }
コード例 #4
0
ファイル: Example_5_Runtime.cs プロジェクト: hon454/LUCY
    //////////////////////////////////////////////////////////////////////////////
    //                                                                          //
    //Unity Functions                                                           //
    //                                                                          //
    //////////////////////////////////////////////////////////////////////////////
    void Start()
    {
        //
        meshFilter = GetComponent <MeshFilter>();

        //
        mcBlob = new MCBlob(meshFilter);

        //
        uiToggle.gameObject.SetActive(true);
    }
コード例 #5
0
 // 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);
     }
 }
コード例 #6
0
 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();
 }
コード例 #7
0
ファイル: MCBlob.cs プロジェクト: mircea-catana/Racecar-Derby
        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;
        }
コード例 #8
0
    // Use this for initialization
    void Start()
    {
        GameObject blobGameObject = transform.parent.gameObject;

        blobs = blobGameObject.GetComponent <MCBlob>();
    }