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);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        protected virtual void OnDestroy()
        {
            SgtJovianModel.MarkForDestruction(model);

            SgtHelper.Destroy(material);
        }