Beispiel #1
0
 AutoAttack[] generateAutoAttacks()
 {
     AutoAttack[] autoAttackWaves = new AutoAttack[3];
     autoAttackWaves[0] = WaveOne.create(this.prefabProjectile, projectileSpeed);
     autoAttackWaves[1] = WaveTwo.create(this.prefabProjectile, projectileSpeed);
     autoAttackWaves[2] = WaveThree.create(this.prefabSpikes);
     return(autoAttackWaves);
 }
Beispiel #2
0
    public static AutoAttack create(GameObject prefab, float speed)
    {
        WaveOne attack = ScriptableObject.CreateInstance <WaveOne>();

        attack.prefab = prefab;
        attack.damage = 30;
        attack.speed  = speed;
        return(attack);
    }