using System; using System.Collections.Generic; using UnityEngine; namespace coa4u { /// /// Instantly hides the target or showes it, if it's hidden. This action does not require the transparency support in shaders. /// class ActionToggleVisibility : ActionInstant { public ActionToggleVisibility() : base() { } /// /// Returns a copy of the action. /// public override ActionInstant clone() { return new ActionToggleVisibility(); } /// /// Returns the reversed version of the action, if it is possible. /// public override ActionInstant reverse() { return new ActionToggleVisibility(); } /// /// This method is called at the action start. /// public override void start() { base.start(); renderer.enabled = !renderer.enabled; } } }