Esempio n. 1
0
    void SpawnGel()
    {
        GameObject gel = Instantiate(gelPrefab, transform.position, Quaternion.identity) as GameObject;

        gel.name             = gelPrefab.name;
        gel.transform.parent = transform.parent;

        gel.GetComponent <HealthController>().ActivateTempInvinc();

        DungeonRoom dr = _enemy.DungeonRoomRef;

        if (dr != null)
        {
            dr.AddEnemy(gel.GetComponent <Enemy>());
        }
    }
Esempio n. 2
0
    void SpawnSingleKeese()
    {
        GameObject g = Instantiate(redKeesePrefab, transform.position, Quaternion.identity) as GameObject;

        g.name = redKeesePrefab.name;

        Transform t = g.transform;

        t.SetParent(transform.parent);
        t.SetY(WorldOffsetY + KEESE_SPAWN_POS_Y);

        g.GetComponent <HealthController>().ActivateTempInvinc();

        DungeonRoom dr = _enemy.DungeonRoomRef;

        if (dr != null)
        {
            dr.AddEnemy(g.GetComponent <Enemy>());
        }
    }