void OnSceneGUI() { BarionController barion = (BarionController)target; //Show the current state in the editor if (barion.GetState() == barion.idle_state) { Handles.Label(barion.transform.position, "IDLE"); } if (barion.GetState() == barion.walking_state) { Handles.Label(barion.transform.position, "WALKING"); } if (barion.GetState() == barion.moving_box_state) { Handles.Label(barion.transform.position, "MOVING BOX"); } if (barion.GetState() == barion.hiding_state) { Handles.Label(barion.transform.position, "HIDING"); } if (barion.GetState() == barion.invisible_sphere_state) { Handles.Label(barion.transform.position, "INVISIBLE SPHERE"); } if (barion.GetState() == barion.shield_state) { Handles.Label(barion.transform.position, "SHIELD"); } }
/// <summary> /// This method is called when the box is selected for first time. /// </summary> public void Selected() { //Barion options if (barion.is_selected) { if (barion.GetState() != barion.moving_box_state || barion.moving_box_state.IsCarryingBox() == false && barion.is_hide) //Barion doesn't have the box yet and its not hided { menus[ground_id].OnInteractableClicked(); //Show Barion options to interact with box in the ground } else { menus[carry_id].OnInteractableClicked(); //Show Barion options to drop the box. } } //Cosmo & Nyx options if ((nyx.is_selected || cosmo.is_selected)) { menus[ground_id].OnInteractableClicked(hide_options); } }