public NavyTask_FillFortress(AILayer_Navy navyLayer, NavyFortress fortress) : base(navyLayer)
    {
        base.TargetGuid   = fortress.Garrison.GUID;
        this.NavyFortress = fortress;
        base.Behavior     = new NavyBehavior_Reinforcement();
        base.Behavior.Initialize();
        IGameService service = Services.GetService <IGameService>();

        this.worldPositionService = service.Game.Services.GetService <IWorldPositionningService>();
    }
示例#2
0
    public void GenerateFillFortress(Fortress fortress)
    {
        NavyTask_FillFortress navyTask_FillFortress = this.navyLayer.FindTask <NavyTask_FillFortress>((NavyTask_FillFortress match) => match.TargetGuid == fortress.GUID);

        if (navyTask_FillFortress != null)
        {
            return;
        }
        NavyFortress navyFortress = this.NavyFortresses.Find((NavyFortress match) => match.Fortress.GUID == fortress.GUID);

        if (navyFortress == null)
        {
            return;
        }
        navyTask_FillFortress = new NavyTask_FillFortress(this.navyLayer, navyFortress);
        this.navyLayer.NavyTasks.Add(navyTask_FillFortress);
    }