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);
            }
        }
예제 #3
0
파일: SgtJovian.cs 프로젝트: dqchess/twin
        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);
        }
예제 #4
0
파일: SgtJovian.cs 프로젝트: dqchess/twin
        protected virtual void OnDestroy()
        {
            SgtJovianModel.MarkForDestruction(model);

            SgtHelper.Destroy(material);
        }