Exemple #1
0
        public void SetEnable(EnableOption option)
        {
            if (isDestroyed)
            {
                return;
            }
            switch (option)
            {
            case EnableOption.enable:
                isActive = true;
                if (useAsRoute)
                {
                    foreach (Transform child in transform)
                    {
                        if (child.GetComponent <SelectManager>() == null)
                        {
                            continue;
                        }
                        child.GetComponent <SelectManager>().ExecuteSelect();
                    }
                }
                break;

            case EnableOption.disable:
                isActive = false;
                break;

            case EnableOption.erase:
                isActive    = false;
                isDestroyed = true;
                baseSprite  = null;
                break;
            }
        }
Exemple #2
0
        public void SetEnable(EnableOption option)
        {
            switch (option)
            {
            case EnableOption.enable:
                isActive = true;
                break;

            case EnableOption.disable:
                isActive = false;
                break;

            case EnableOption.erase:
                transform.parent.GetComponent <CrimeObject>().selectList.Remove(this);
                Destroy(gameObject);
                break;
            }
        }
Exemple #3
0
 public void SetEnable(EnableOption option)
 {
     if (isDestroyed)
         return;
     switch (option)
     {
         case EnableOption.enable:
             isActive = true;
             if (useAsRoute)
                 foreach (Transform child in transform)
                 {
                     if (child.GetComponent<SelectManager>() == null)
                         continue;
                     child.GetComponent<SelectManager>().ExecuteSelect();
                 }
             break;
         case EnableOption.disable:
             isActive = false;
             break;
         case EnableOption.erase:
             isActive = false;
             isDestroyed = true;
             baseSprite = null;
             break;
     }
 }