Ejemplo n.º 1
0
    void Awake()
    {
        Data.score       = 0;
        scrEnemySummoner = GetComponent <EnemySummoner> ();

        InvokeRepeating("StartSummonEnemy", 0f, 3f);
    }
Ejemplo n.º 2
0
    private void Start()
    {
        mEnemy               = GetComponent <Enemy>();
        mSummonerAI          = GetComponent <EnemySummoner>();
        mProjectileThrowerAI = GetComponent <EnemyProjectileThrower>();
        mSpellCasterAI       = GetComponent <EnemySpellCaster>();
        mStatistics          = GetComponent <CharacterStatistics>();
        mKillable            = GetComponent <Killable>();

        mAllAIModules = new List <EnemyAI>()
        {
            mSummonerAI, mProjectileThrowerAI, mSpellCasterAI
        };

        mSummonerAI.enabled  = true;
        mCurrentActiveModule = mSummonerAI;

        mEnemy.SetEnemyAI(this);
        mKillable.onHit   += OnHit;
        mKillable.onDeath += OnDeath;

        Game.instance.hud.bossHealth.gameObject.SetActive(true);
        Game.instance.hud.bossHealth.SetWithValues(0, mKillable.health, mKillable.health);

        Game.instance.hud.bossHealth.transform.localScale = Vector3.zero;
        Game.instance.hud.bossHealth.transform.DOScale(1f, 0.5f);
    }
Ejemplo n.º 3
0
    public void ComecarSinglePlayer()
    {
        EnemySummoner summonerScript = GameObject.Find("enemySummoner").GetComponent <EnemySummoner>();

        summonerScript.autoSpawnEnemies = true;
        IniciarPartida();
        summonerScript.InitAutoSpawn();
    }
Ejemplo n.º 4
0
    /// <summary>
    /// Main화면에서 전투를 시작하기전에 유닛을 초기화 해준다.
    /// </summary>
    public static void ResetUnit()
    {
        for (int index = 0; index < Units.Count; index++)
        {
            if (Units[index].IsUsed)
            {
                Units[index].SetIsUsed(false);
            }
        }

        MySummoner.SetActive(false);
        EnemySummoner.SetActive(false);
    }