Exemple #1
0
        private void RemoveGizmu()
        {
            ProjectileGizmo gizmo = GetComponent <ProjectileGizmo>();

            if (gizmo != null)
            {
                DestroyImmediate(gizmo);
            }
            else
            {
                Debug.LogWarning("Gizmo doesn't exist on this game object.");
            }
        }
Exemple #2
0
        private void AddGizmu()
        {
            ProjectileGizmo gizmo = GetComponent <ProjectileGizmo>() ?? gameObject.AddComponent <ProjectileGizmo>();

            gizmo.projectile = this;
        }