/// <summary> /// Method called to fire the Event. Will trigger all methods subscribed to the specified Event_Trigger. /// </summary> /// <param name="evnt">The Event_Trigger whose methods you want to trigger</param> /// <param name="act">The Character_Action being performed to trigger the event. Used to parse the string value.</param> /// <param name="value">A string containing the value of the given Action. May contain Acceptable_Shortcuts</param> /// <param name="target">The target of the Character_Action</param> public static void Broadcast(Event_Trigger evnt, Character_Action act, string value, GameObject target) { if (events[evnt] != null) { events[evnt](act, value, target); } }
/// <summary> /// Used for initialization. /// Finds the Canvas to draw the UI text on. /// Finds the Main Camera. /// Sets up the Character_Action Menu /// Loads the first Scenario. /// </summary> void Start() { controlls = createControlls(); canvas = GameObject.Find("Canvas"); popup = Resources.Load <FloatingText>("Prefabs/Scenario Prefabs/Object Prefabs/PopupTextParent"); main_camera = GameObject.FindGameObjectWithTag("MainCamera"); all_actions = Character_Action.Load_Actions(); all_weapons = Weapon.Load_Weapons(); all_armors = Armor.Load_Armors(); curr_scenario = new Scenario(STARTING_SCENARIO); avail_scenarios = new ArrayList(); avail_scenarios.Add(curr_scenario); curr_scenario.Load_Scenario(); action_menu.GetComponent <Action_Menu_Script>().Initialize(); action_menu.GetComponent <Action_Menu_Script>().resetActions(); //MarkReachable (); }