Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     amyModel      = HumanoidStore.GetAmyModel();
     chanionModel  = HumanoidStore.GetChanionModel();
     enemiesModels = HumanoidStore.GetEnemiesModels();
     enemyMarkers  = EnemyMarkerStore.GetEnemyMarkers();
 }
Exemplo n.º 2
0
 void Start()
 {
     humanoidSubscribers.Add(HumanoidStore.GetAmyModel());
     humanoidSubscribers.Add(HumanoidStore.GetChanionModel());
     foreach (AIHumanoidModel enemy in HumanoidStore.GetEnemiesModels())
     {
         humanoidSubscribers.Add(enemy);
     }
 }
Exemplo n.º 3
0
 void Start()
 {
     amyTarget = HumanoidStore.GetAmyModel();
     enemyMarkerLocations.ForEach(m =>
     {
         EnemyMarker newMarker = new EnemyMarker(amyTarget, m.position, null);
         targeters.ForEach(t =>
         {
             CommunicatableEnemyMarker newCMarker = new CommunicatableEnemyMarker(
                 newMarker,
                 5
                 );
             t.AddEnemyMarker(newCMarker);
         });
     });
 }
Exemplo n.º 4
0
    public bool KeepDestination(MapNode node)
    {
        List <AIHumanoidModel> allies = HumanoidStore.GetEnemiesModels();
        bool    free           = true;
        Vector3 nodeLocation   = node.GetLocation();
        Vector2 nodeLocation2D = nodeLocation.To2D();

        foreach (AIHumanoidModel ally in allies)
        {
            if (Vector3.Distance(ally.InfoGetCenterBottom(), nodeLocation)
                < occupancyRadius)
            {
                free = false;
                break;
            }
        }

        return(free && node.IsCoverNode() && attackPlanner.TooCloseToEnemyBounds(
                   enemyAvoidanceRadius
                   ));
    }
Exemplo n.º 5
0
    void Awake()
    {
        GameObject amy = amyObject.transform.GetChild(0).gameObject;

        amyModel = amyObject.GetComponentInChildren <AmyModel>();

        GameObject chanion = chanionObject.transform.GetChild(0).gameObject;

        chanionModel = chanionObject.GetComponentInChildren <ChanionModel>();

        enemiesModels = new List <AIHumanoidModel>();
        foreach (Transform enemy in enemiesObject.transform)
        {
            AIHumanoidModel model = enemy.GetComponent <AIHumanoidModel>();
            if (model != null)
            {
                enemiesModels.Add(model);
            }
        }

        instance = this;
    }