public static void Pool(SgtJovianModel model)
        {
            if (model != null)
            {
                model.Jovian = null;

                SgtComponentPool <SgtJovianModel> .Add(model);
            }
        }
        public static void MarkForDestruction(SgtJovianModel model)
        {
            if (model != null)
            {
                model.Jovian = null;

                model.gameObject.SetActive(true);
            }
        }
Exemple #3
0
        public void UpdateModel()
        {
            if (model == null)
            {
                model = SgtJovianModel.Create(this);
            }

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

            model.SetMesh(Mesh);
            model.SetMaterial(material);
            model.SetScale(scale);
        }
Exemple #4
0
        protected virtual void OnDestroy()
        {
            SgtJovianModel.MarkForDestruction(model);

            SgtHelper.Destroy(material);
        }