Exemple #1
0
        public void updateMesh()
        {
            if (this.sc != null)
            {
                meshIdToObject.Remove(this.getMeshId());
                this.sc.removeMeshes();
            }

            Color color = this.getMeshColor();

            this.sc             = new SphereCompleter(this.container, this.gameObject, color);
            this.meshGameObject = sc.generatePathAndMesh();
            if (this.isMeshMutated)
            {
                this.meshMutation();
            }
            meshIdToObject.Add(this.getMeshId(), this);
        }
Exemple #2
0
        public MeshedSkeleton(GameObject container, Vector3 positionOnScreen, GameObject gameObject, Dictionary <int, MeshedSkeleton> meshIdToObject, bool isSelected = false, bool isMeshMutated = false)
        {
            this.container        = container;
            this.positionOnScreen = positionOnScreen;
            this.originalSkeleton = gameObject;
            this.originalSkeleton.SetActive(false);
            this.originalSkeleton.transform.parent = this.container.transform;
            this.originalSkeleton.name             = "OriginalSkeleton" + this.container.GetInstanceID().ToString();

            this.meshIdToObject = meshIdToObject;
            this.isSelected     = isSelected;
            this.isMeshMutated  = isMeshMutated;

            this.gameObject = (GameObject)Object.Instantiate(this.originalSkeleton, new Vector3(0, 0, 0), Quaternion.identity, this.container.transform);
            this.gameObject.SetActive(false);
            this.gameObject.name = "FilledOutSkeleton" + this.container.GetInstanceID().ToString();

            this.container.transform.localPosition = positionOnScreen;
            this.sc = null;
            this.updateMesh();
        }