void Awake() { cosmo = GameObject.Find("Cosmo").GetComponent <CosmoController>(); nyx = GameObject.Find("Nyx").GetComponent <NyxController>(); barion = GameObject.Find("Barion").GetComponent <BarionController>(); cursor = GameObject.Find("Cursor").GetComponent <CursorManager>(); }
BoxHideInteractable hide_inst; //Hide controller instance void Awake() { barion = GameObject.Find("Barion").GetComponent <BarionController>(); nyx = GameObject.Find("Nyx").GetComponent <NyxController>(); cosmo = GameObject.Find("Cosmo").GetComponent <CosmoController>(); selection_sys = GameObject.Find("SelectionSystem").GetComponent <UnitSelection>(); //Insert all menus in the dictionary RadialMenu_ObjectInteractable[] menus_scripts = GetComponents <RadialMenu_ObjectInteractable>(); foreach (RadialMenu_ObjectInteractable menu_script in menus_scripts) { menus.Add(menu_script.id, menu_script); } hide_inst = GetComponent <BoxHideInteractable>(); }
void OnSceneGUI() { NyxController nyx = (NyxController)target; //Show the current state in the editor if (nyx.GetState() == nyx.idle_state) { Handles.Label(nyx.transform.position, "IDLE"); } if (nyx.GetState() == nyx.walking_state) { Handles.Label(nyx.transform.position, "WALKING"); } if (nyx.GetState() == nyx.killing_state) { Handles.Label(nyx.transform.position, "KILLING"); } if (nyx.GetState() == nyx.dash_state) { Handles.Label(nyx.transform.position, "DASH"); } if (nyx.GetState() == nyx.hiding_state) { Handles.Label(nyx.transform.position, "HIDING"); } if (nyx.GetState() == nyx.death_trap_state) { Handles.Label(nyx.transform.position, "DEATHTRAP"); } //Range of death trap Handles.color = Color.blue; Handles.DrawWireArc(nyx.transform.position, Vector3.up, Vector3.forward, 360, nyx.death_trap_range); }
void OnTriggerEnter(Collider col) { if (col.tag == Tags.player && col.name != Objects.barion) { if (col.name == Objects.cosmo) //Cosmo { CosmoController cosmo = col.gameObject.GetComponent <CosmoController>(); if (cosmo.GetState() == cosmo.idle_state) { cosmo.ChangeStateTo(cosmo.chained_state); } } if (col.name == Objects.nyx) //Nyx { NyxController nyx = col.gameObject.GetComponent <NyxController>(); if (nyx.GetState() == nyx.idle_state) { nyx.ChangeStateTo(nyx.chained_state); } } } }
Vector3 destination = new Vector3(); //Pathfinding public NyxKillingState(NyxController nyx_controller) { nyx = nyx_controller; }
GameObject dash_trail = null; //Dash trail animation public NyxDashState(NyxController nyx_controller) { nyx = nyx_controller; }
Vector3 destination = new Vector3(); //Pathfinding public NyxChainedState(NyxController nyx_controller, Transform barion) { nyx = nyx_controller; barion_position = barion; agent = nyx.agent; }
private Vector3 destination = new Vector3(); //Pathfinding destination. public NyxIdleState(NyxController nyx_controller) { nyx = nyx_controller; }
float box_spawn_delay = 3; //Delay in Z axis when getting out the box. public NyxHidingState(NyxController nyx_controller) { nyx = nyx_controller; }
public DeathTrap trap = null; //Reference to the current trap public NyxDeathTrapState(NyxController nyx_controller) { nyx = nyx_controller; }
private Vector3 destination = new Vector3(); //Pathfinding destination. public NyxWalkingState(NyxController nyx_controller) { nyx = nyx_controller; }