//****************************************************************************** //***************************BEGIN NON-SM METHODS******************************* //****************************************************************************** //Constructor public EnemySM() { //Create Interface Options at Construction IsMoving = new Moving(this); IsAttacking = new Attacking(this); IsDeathSet = new DeathSet(this); IsIdle = new Idle(this); IsPursuing = new Pursuing(this); //Set Current State emCurrent = IsIdle; StartIdle(); }
public void SetCallbacks(IEnemyActions instance) { if (m_Wrapper.m_EnemyActionsCallbackInterface != null) { @Shoot.started -= m_Wrapper.m_EnemyActionsCallbackInterface.OnShoot; @Shoot.performed -= m_Wrapper.m_EnemyActionsCallbackInterface.OnShoot; @Shoot.canceled -= m_Wrapper.m_EnemyActionsCallbackInterface.OnShoot; } m_Wrapper.m_EnemyActionsCallbackInterface = instance; if (instance != null) { @Shoot.started += instance.OnShoot; @Shoot.performed += instance.OnShoot; @Shoot.canceled += instance.OnShoot; } }
//****************************************************************************** //******************************END NON-SM METHODS****************************** //****************************************************************************** //****************************************************************************** //******************************BEGIN STATE MACHINE***************************** //****************************************************************************** //------------------------------------------------------------------------------ //Set Current Status public void SetEnemyState(IEnemyActions newState) { emCurrent = newState; }//End Set Enemy Movement State