private void addAlienTypeToSpawner(alienType type) { int typeInt = 0; switch (type) { case alienType.Circle: typeInt = 0; break; case alienType.CrushedSquare: typeInt = 1; break; case alienType.CirclePair: typeInt = 2; break; case alienType.CircleTrio: typeInt = 3; break; case alienType.LongSquare: typeInt = 4; break; } addAlienTypeEvent.Raise(typeInt); }
private void spawnAlien(alienType type, int amount) { int typeInt = 0; switch (type) { case alienType.Circle: typeInt = 0; break; case alienType.CrushedSquare: typeInt = 1; break; case alienType.CirclePair: typeInt = 2; break; case alienType.CircleTrio: typeInt = 3; break; case alienType.LongSquare: typeInt = 4; break; } Vector2 spawnVector = new Vector2(typeInt, amount); spawnAlienEvent.Raise(spawnVector); }