Exemple #1
0
    private void CreateEnemy(GameObject enemyPrefab, Transform spawnTr)
    {
        GameObject g        = Instantiate(enemyPrefab);
        Starship   starship = g.GetComponent <Starship>();

        g.transform.position            = spawnTr.position;
        starship.RotationPoint.rotation = spawnTr.rotation;

        systemStarships.StarshipsTeams[enemyTeamID].AddStarship(starship);
        starship.SetFollowTarget(playerTransform);
        starship.SetAttack(true);
        starship.SetFollowEnemy(true);
        starship.DeathEvent += OnEnemyDeath;
        starship.SetLockControl(false);
    }
Exemple #2
0
    private IEnumerator IDisqualificate()
    {
        isDisqualified = true;
        yield return(GameDialogs.IShowInGameDialogEvent(5));

        int team = systemStarships.StarshipChangeTeamToNew(C07Starship, 0);

        systemStarships.StarshipChangeTeam(PlayerStarship, 0, team);
        C07Health.SetInvincible(false);
        C07Starship.SetFollowTarget(PlayerStarshipTr);
        systemStarships.StarshipsTeams[0].SetFollowTarget(PlayerStarshipTr);
        if (isShowedDialog2)
        {
            GameDialogs.ShowInGameDialogEvent(3);
        }
        else
        {
            GameDialogs.ShowInGameDialogEvent(7);
        }
    }