Example #1
0
    void Start()
    {
        /**Gets called by unity when the script is initialized
         * */

        //initialization
        mainState          = FiniteState.Still;
        attackState        = AttackState.InPosition;
        targetWayPointType = WayPoint.ambush;

        enemyMovement = GetComponent <EnemyMovement> ();
        character     = GetComponent <EnemyCharacter>();
        agent         = gameObject.GetComponent <NavMeshAgent> ();
        logicTime     = delta_LogicTime;
        visionTime    = delta_VisionTime;
        threatSpottedeltaTimeimeOut = deltaTime_ThreatSpottedTimemeOut;
        threat              = null;
        dir                 = Vector3.zero;
        ambushTimeOut       = 0.0f;
        delta_AmbushTimeOut = 2.0f;
        delta_MotionTimeOut = 8.0f;
        motionTimeOut       = time + delta_MotionTimeOut;
        tactics             = RoundManager.AITactics;
        rand                = new System.Random();
    }
Example #2
0
    //========================================================================================

    // Use this for initialization
    void Start()
    {
        roundCounter = 0;
        spawner      = gameObject.GetComponent <EnemySpawner>();
        AITactics    = gameObject.GetComponent <AITacticalUnit>();
        KillRound();
        gameInProgress = true;
    }