예제 #1
0
 public DynamicRadiusView()
 {
     this.identity      = ++DynamicRadiusView.LastIdentity;
     this.particleView  = new RadiusView();
     this.radiusParent  = new GameObject("RadiusView_" + this.identity);
     this.triggerRadius = new GameObject("Trigger_" + this.identity);
     this.effectRadius  = new GameObject("Effect_" + this.identity);
     this.triggerRadius.transform.parent = this.radiusParent.transform;
     this.effectRadius.transform.parent  = this.radiusParent.transform;
     this.HideHighlight();
 }
예제 #2
0
 public DynamicRadiusView()
 {
     this.EFFECT_COLOR  = new Color(1f, 0f, 0f, 0.9f);
     this.TRIGGER_COLOR = new Color(0.4f, 0f, 0f, 0.7f);
     base..ctor();
     this.identity      = ++DynamicRadiusView.LastIdentity;
     this.particleView  = new RadiusView();
     this.radiusParent  = new GameObject("RadiusView_" + this.identity);
     this.triggerRadius = new GameObject("Trigger_" + this.identity);
     this.effectRadius  = new GameObject("Effect_" + this.identity);
     this.triggerRadius.transform.parent = this.radiusParent.transform;
     this.effectRadius.transform.parent  = this.radiusParent.transform;
     this.HideHighlight();
 }
예제 #3
0
        public void Destroy()
        {
            UnityEngine.Object.Destroy(this.effectRadius);
            UnityEngine.Object.Destroy(this.triggerRadius);
            UnityEngine.Object.Destroy(this.radiusParent);
            this.particleView.Destroy();
            this.particleView = null;
            UnityEngine.Object.Destroy(this.effectTexture);
            UnityEngine.Object.Destroy(this.triggerTexture);
            UnityEngine.Object.Destroy(this.effectMaterial);
            UnityEngine.Object.Destroy(this.triggerMaterial);
            AssetManager assetManager = Service.AssetManager;

            if (this.effectHandle != AssetHandle.Invalid)
            {
                assetManager.Unload(this.effectHandle);
                this.effectHandle = AssetHandle.Invalid;
            }
            if (this.triggerHandle != AssetHandle.Invalid)
            {
                assetManager.Unload(this.triggerHandle);
                this.triggerHandle = AssetHandle.Invalid;
            }
        }