public static void MarkForDestruction(SgtCloudsphereModel model)
        {
            if (model != null)
            {
                model.Cloudsphere = null;

                model.gameObject.SetActive(true);
            }
        }
        public static void Pool(SgtCloudsphereModel model)
        {
            if (model != null)
            {
                model.Cloudsphere = null;

                SgtComponentPool <SgtCloudsphereModel> .Add(model);
            }
        }
예제 #3
0
        public void UpdateModel()
        {
            if (model == null)
            {
                model = SgtCloudsphereModel.Create(this);
            }

            var scale = SgtHelper.Divide(Radius, MeshRadius);

            model.SetMesh(Mesh);
            model.SetMaterial(material);
            model.SetScale(scale);
        }
예제 #4
0
 protected virtual void OnDestroy()
 {
     SgtCloudsphereModel.MarkForDestruction(model);
     SgtHelper.Destroy(material);
 }