public bool SetScheduled(Targetable target) { if (IsTargeting && null == target) { return(false); } if (!IsTargeting && null != target) { return(false); } if (IsTargeting && !getPossibleTargets().Contains(target)) { return(false); } this.Target = target; getNode().isScheduled = true; if (target != null) { target.addScheduledAction(this); } if (OnStateUpdate != null) { OnStateUpdate(this); } return(true); }