// public void AcceptMessage(EditorObjectMessage message, EditorObject caller) // { // switch (message) // { // case EditorObjectMessage.Activate: // OnActivate(caller); // break; // // case EditorObjectMessage.Deactivate: // OnDeactivate(caller); // break; // // case EditorObjectMessage.Toggle: // OnToggle(caller); // break; // // case EditorObjectMessage.Disable: // OnDisabled(caller); // break; // // case EditorObjectMessage.Enable: // OnEnabled(caller); // break; // // default: // Debug.LogWarning(string.Format("Message {0} from caller {1} to subject {2} unrecognized.", // message.ToString(), caller.name, this.name)); // break; // } // } public void SetState(EDITOROBJECTSTATES state) { switch (state) { case EDITOROBJECTSTATES.ACTIVE: //stuff to do when going active break; case EDITOROBJECTSTATES.INACTIVE: //stuff to do when going inactive break; case EDITOROBJECTSTATES.DISABLED: //stuff to do when going disabled break; } }
public void SetState(EDITOROBJECTSTATES state) { switch (state) { case EDITOROBJECTSTATES.ACTIVE: //stuff to do when going active break; case EDITOROBJECTSTATES.INACTIVE: //stuff to do when going inactive break; case EDITOROBJECTSTATES.DISABLED: //stuff to do when going disabled break; } }