Пример #1
0
    //******************************************************************************
    //***************************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();
    }
Пример #2
0
 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;
     }
 }
Пример #3
0
    //******************************************************************************
    //******************************END NON-SM METHODS******************************
    //******************************************************************************


    //******************************************************************************
    //******************************BEGIN STATE MACHINE*****************************
    //******************************************************************************
    //------------------------------------------------------------------------------
    //Set Current Status
    public void SetEnemyState(IEnemyActions newState)
    {
        emCurrent = newState;
    }//End Set Enemy Movement State