Ejemplo n.º 1
0
    private void RemoveSystem(bool _wasChecked)
    {
        if (!_wasChecked)
        {
            if (IsFree())
            {
                if (!last)
                {
                    //thisNextObj.GetComponent <SystemScript> ().RemoveSystem (false);
                    thisNextSys.RemoveSystem(false);
                }
                else
                {
                    //originObj.GetComponent <SystemScript> ().RemoveSystem (true);
                    originSys.RemoveSystem(true);
                }
            }
            else
            {
                Debug.Log("System is Obstructed");
            }
        }

        if (_wasChecked)
        {
            if (this.gameObject == originObj)
            {
                LevelManager.Instance.parameterList.Remove(saveStr);
            }


            if (!last)
            {
                //thisNextObj.GetComponent <SystemScript> ().RemoveSystem (true);
                thisNextSys.RemoveSystem(true);
            }

            UndoBool();

            Destroy(gameObject);
        }
    }