Example #1
0
        public void Execute(GameElementManager elementManager)
        {
            IActivatable activatable = elementManager.GetActivatableGameElement(refId);

            if (activatable == null)
            {
                ObjectManager.Logger.LogWarn("There is no activatable element with the given id, however an action is reffering it! The given id: " + refId);
            }
            if (valueToSet == null)
            {
                activatable.SetActive(!activatable.IsActive());
            }
            else
            {
                activatable.SetActive((bool)valueToSet);
            }
        }