Diagonal projectile launcher

This commit is contained in:
Martin
2022-12-01 12:16:52 +01:00
parent ab4935403e
commit 772a5cc7e0
7 changed files with 381 additions and 294 deletions

View File

@@ -5,13 +5,13 @@ import { IProjectileCollisionSignaler } from "../../../Projectile/IProjectileCol
import { ProjectileCollision } from "../../../Projectile/ProjectileCollision";
import { ProjectileLauncher } from "./ProjectileLauncher";
export class HorizontalProjectileLauncher implements IProjectileCollisionSignaler {
export class WaveProjectileLauncher implements IProjectileCollisionSignaler {
private currentUpgrade = 0;
private wavesToShootPerUpgrade = 0;
public constructor(private launcher: ProjectileLauncher, playerNode: Node, settings: WaveLauncherSettings) {
public constructor(private launcher: ProjectileLauncher, playerNode: Node, directions: Vec2[], settings: WaveLauncherSettings) {
this.wavesToShootPerUpgrade = settings.wavesToShootPerUpgrade;
launcher.init(playerNode, [new Vec2(-1, 0), new Vec2(1, 0)], settings.launcher);
launcher.init(playerNode, directions, settings.launcher);
}
public get ProjectileCollisionEvent(): ISignal<ProjectileCollision> {

View File

@@ -2,7 +2,7 @@
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "1e160c96-efda-4b1a-8e21-8c1b525bc7ef",
"uuid": "1ed6eff1-da2e-4727-8f44-2e802848719c",
"files": [],
"subMetas": {},
"userData": {}