Created
November 5, 2014 23:18
-
-
Save jonbro/35e1066a8ca4d0b369fc to your computer and use it in GitHub Desktop.
supertrigger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Serializable] | |
| public class ActionInput{ | |
| public enum ActionType | |
| { | |
| ENTER_TRIGGER, | |
| EXIT_TRIGGER, | |
| STAY_TRIGGER, | |
| OBJECT_ACTIVE, | |
| PRESS_KEY | |
| } | |
| public KeyCode keyToPress; | |
| public ActionInput.ActionType action; | |
| public GameObject objectCheck; | |
| } | |
| [Serializable] | |
| public class ActionOutput{ | |
| public enum ActionType | |
| { | |
| PLAY_SOUND, | |
| ENABLE_OBJECT, | |
| DISABLE_OBJECT, | |
| ENABLE_COMPONENT, | |
| DISABLE_COMPONENT, | |
| SET_TEXT, | |
| SINGLE_EXECUTION // only one group can execute on the frame this one does | |
| } | |
| public float StartTime; | |
| public GameObject targetObject; | |
| public ActionOutput.ActionType action; | |
| public string textTarget; | |
| } | |
| [Serializable] | |
| public class TriggerGroup{ | |
| public string GroupName; | |
| public List<ActionInput> actionInputs; | |
| public List<ActionOutput> actionOutputs; | |
| } | |
| public class SuperTrigger : MonoBehaviour | |
| { | |
| public List<TriggerGroup> triggerGroups; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment