예제 #1
0
    /// <summary>
    /// Start does all the work for allocating the cover point, since it only happens once
    /// </summary>
    /// <param name="ai">The AI executing the action</param>
    public override void Start(AI ai)
    {
        base.Start(ai);

        //Use a sensor named Tactical Sensor.  We could change this to an input Expression
        //if we want the FindCoverPoint action to be a little more re-useable
        if (_coverSensor == null)
            _coverSensor = ai.Senses.GetSensor("Tactical Sensor") as TacticalSensor;

        //Reset and make sure we don't accidentally already have a reserved cover point
        Vacate(ai);

        //Do the work
        FindBestCoverPoint(ai);
    }
예제 #2
0
    /// <summary>
    /// Start finds and stores the tactical sensor
    /// </summary>
    /// <param name="ai">The AI executing the action</param>
    public override void Start(AI ai)
    {
        base.Start(ai);

        //Use a sensor named Tactical Sensor.
        if (_tacticalSensor == null)
            _tacticalSensor = ai.Senses.GetSensor("Tactical Sensor") as TacticalSensor;
    }