Beispiel #1
0
    private void InitFireTeam()
    {
        FireTeamCharacters = new FireTeamSquad ();
        CharacterDirector = new CharacterManager ();

        foreach (NewSoldierData Data in FireTeamData) {

            SoldierBuilder Builder = new SoldierBuilder (Data);
            FireTeamSoldier CreatedCharacter = CharacterDirector.CreateSoldier (Builder);

            CreatedCharacter.OnCharacterReachDestinationEvent += OnCharacterReachDestination;
            CreatedCharacter.OnClickAndTapOnCharacterEvent += OnFireTeamCharacterTapAndClick;
            FireTeamCharacters.AddFireTeamSoldier(CreatedCharacter);
        }

        List<Vector3> StartLocations = LevelMapDirector.GetSoldiersStartingLocations ();
        FireTeamCharacters.PlaceSquadOnMap (StartLocations);

        List<FireTeamSoldier> Soldiers = FireTeamCharacters.GetSoldiersList();
        foreach(FireTeamSoldier Soldier in Soldiers) {
            LevelMapDirector.SetCellStatus(Soldier.GetPosition(), LevelMap.OCCUPY_CELL_VALUE);
        }

        Logic.SetFireTeamSquad (FireTeamCharacters);
    }
 public void SetFireTeamSquad(FireTeamSquad Squad)
 {
     SoldiersSquad = Squad;
 }