new enemies

This commit is contained in:
Martin 2022-12-26 18:49:48 +01:00
parent 631d59c8e4
commit b278e81a75
29 changed files with 962 additions and 852 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "2d9684c7-bb09-480c-8bda-bec0fa86b7f4",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -1,7 +1,7 @@
[
{
"__type__": "cc.Prefab",
"_name": "BarbarianProjectile",
"_name": "AxeProjectile",
"_objFlags": 0,
"_native": "",
"data": {
@ -13,7 +13,7 @@
},
{
"__type__": "cc.Node",
"_name": "BarbarianProjectile",
"_name": "AxeProjectile",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
@ -236,7 +236,7 @@
"__id__": 11
},
"tag": 0,
"_group": 4,
"_group": 64,
"_density": 1,
"_sensor": false,
"_friction": 0.2,

View File

@ -8,6 +8,6 @@
],
"subMetas": {},
"userData": {
"syncNodeName": "BarbarianProjectile"
"syncNodeName": "AxeProjectile"
}
}

View File

@ -1,7 +1,7 @@
[
{
"__type__": "cc.Prefab",
"_name": "DarkRavenProjectile",
"_name": "MagicOrbProjectile",
"_objFlags": 0,
"_native": "",
"data": {
@ -13,7 +13,7 @@
},
{
"__type__": "cc.Node",
"_name": "DarkRavenProjectile",
"_name": "MagicOrbProjectile",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
@ -236,7 +236,7 @@
"__id__": 11
},
"tag": 0,
"_group": 4,
"_group": 64,
"_density": 1,
"_sensor": false,
"_friction": 0.2,

View File

@ -8,6 +8,6 @@
],
"subMetas": {},
"userData": {
"syncNodeName": "DarkRavenProjectile"
"syncNodeName": "MagicOrbProjectile"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -77,7 +77,8 @@ export class MetaUpgradeSettings {
}
export class EnemyManagerSettings {
public projectileLauncher1 = new EnemyLauncherSettings();
public axeLauncher = new EnemyLauncherSettings();
public magicOrbLauncher = new EnemyLauncherSettings();
public enemies: EnemySettings[] = [new EnemySettings()];
public periodicFollowMovers: PeriodicFollowMoverSettings[] = [new PeriodicFollowMoverSettings()];
public individualEnemySpawners: IndividualEnemySpawnerSettings[] = [new IndividualEnemySpawnerSettings()];

View File

@ -41,7 +41,8 @@ export class Game extends Component {
@property(ProjectileLauncher) private haloProjectileLauncherComponent: ProjectileLauncher;
@property(ProjectileLauncher) private horizontalProjectileLauncherComponent: ProjectileLauncher;
@property(ProjectileLauncher) private diagonalProjectileLauncherComponent: ProjectileLauncher;
@property(ProjectileLauncher) private enemyProjectileLauncherComponent: ProjectileLauncher;
@property(ProjectileLauncher) private enemyAxeProjectileLauncherComponent: ProjectileLauncher;
@property(ProjectileLauncher) private enemyMagicOrbProjectileLauncherComponent: ProjectileLauncher;
@property(EnemyManager) private enemyManager: EnemyManager;
@property(ItemManager) private itemManager: ItemManager;
@property(Camera) private camera: Camera;
@ -55,7 +56,8 @@ export class Game extends Component {
private horizontalProjectileLauncher: WaveProjectileLauncher;
private diagonalProjectileLauncher: WaveProjectileLauncher;
private enemyProjectileLauncher: EnemyProjectileLauncher;
private enemyAxeProjectileLauncher: EnemyProjectileLauncher;
private enemyMagicOrbProjectileLauncher: EnemyProjectileLauncher;
private itemAttractor: ItemAttractor;
@ -122,11 +124,18 @@ export class Game extends Component {
projectileData
);
this.enemyProjectileLauncher = new EnemyProjectileLauncher(
this.enemyProjectileLauncherComponent,
this.enemyAxeProjectileLauncher = new EnemyProjectileLauncher(
this.enemyAxeProjectileLauncherComponent,
this.player.node,
this.enemyManager,
settings.enemyManager.projectileLauncher1
settings.enemyManager.axeLauncher
);
this.enemyMagicOrbProjectileLauncher = new EnemyProjectileLauncher(
this.enemyMagicOrbProjectileLauncherComponent,
this.player.node,
this.enemyManager,
settings.enemyManager.magicOrbLauncher
);
new PlayerProjectileCollisionSystem([this.haloProjectileLauncher, this.horizontalProjectileLauncher, this.diagonalProjectileLauncher]);
@ -184,7 +193,8 @@ export class Game extends Component {
this.haloProjectileLauncher.gameTick(deltaTime);
this.horizontalProjectileLauncher.gameTick(deltaTime);
this.diagonalProjectileLauncher.gameTick(deltaTime);
this.enemyProjectileLauncher.gameTick(deltaTime);
this.enemyAxeProjectileLauncher.gameTick(deltaTime);
this.enemyMagicOrbProjectileLauncher.gameTick(deltaTime);
this.itemAttractor.gameTick(deltaTime);
this.background.gameTick();