Organize src/game into sub-folders: arena, combat, fighter, and match
This commit is contained in:
@@ -22,23 +22,23 @@ import {
|
||||
SPECTATOR_LATE_FIGHTER_THRESHOLD,
|
||||
SPECTATOR_LATE_FIGHT_ZOOM,
|
||||
SPECTATOR_RANDOM_FOCUS_INTERVAL,
|
||||
} from "../constants.js";
|
||||
} from "../../constants.js";
|
||||
import { drawArena } from "./arenaRenderer.js";
|
||||
import { clearCombatObjects, updateFighter } from "./combat.js";
|
||||
import { createFighterAnimations, preloadFighterSheets } from "./fighterAssets.js";
|
||||
import { createFighter, syncFighterHud } from "./fighterFactory.js";
|
||||
import { fighterManifest } from "./fighterManifest.js";
|
||||
import { pickFighters } from "./fighterSelection.js";
|
||||
import { createMatchSetup, matchStatusText } from "./matchSetup.js";
|
||||
import { addTodayDeathStats, fetchTodayDeathStats } from "../ui/deathStats.js";
|
||||
import { createFighterPlans, clusterSpawnPosition, syncTeamSizes } from "./arenaMatchRuntime.js";
|
||||
import { clearCombatObjects, updateFighter } from "../combat/combat.js";
|
||||
import { createFighterAnimations, preloadFighterSheets } from "../fighter/fighterAssets.js";
|
||||
import { createFighter, syncFighterHud } from "../fighter/fighterFactory.js";
|
||||
import { fighterManifest } from "../fighter/fighterManifest.js";
|
||||
import { pickFighters } from "../fighter/fighterSelection.js";
|
||||
import { createMatchSetup, matchStatusText } from "../match/matchSetup.js";
|
||||
import { addTodayDeathStats, fetchTodayDeathStats } from "../../ui/deathStats.js";
|
||||
import { createFighterPlans, clusterSpawnPosition, syncTeamSizes } from "../match/arenaMatchRuntime.js";
|
||||
import {
|
||||
createDeathCounts,
|
||||
normalizeDeathCounts,
|
||||
addDeathCounts,
|
||||
normalizeSpecies,
|
||||
createDeathNoticeMessage,
|
||||
} from "../ui/battleDeathNotice.js";
|
||||
} from "../../ui/battleDeathNotice.js";
|
||||
import {
|
||||
getSpectatorState,
|
||||
averageFighterPosition,
|
||||
@@ -51,21 +51,21 @@ import {
|
||||
easeOutCubic,
|
||||
easeInOutCubic,
|
||||
arcadePhysicsTimeScale,
|
||||
} from "./arenaFinalCombatEffects.js";
|
||||
} from "../combat/arenaFinalCombatEffects.js";
|
||||
import {
|
||||
createVictoryCelebration,
|
||||
primeVictoryFanfareAudio,
|
||||
removeVictoryCelebration,
|
||||
} from "../ui/victoryCelebration.js";
|
||||
import { updateScoreboard } from "../ui/arenaScoreboard.js";
|
||||
import { appendKillLog, resetKillLog } from "../ui/arenaKillLog.js";
|
||||
} from "../../ui/victoryCelebration.js";
|
||||
import { updateScoreboard } from "../../ui/arenaScoreboard.js";
|
||||
import { appendKillLog, resetKillLog } from "../../ui/arenaKillLog.js";
|
||||
import {
|
||||
BATTLE_NOTICE_DELAY_MS,
|
||||
BATTLE_NOTICE_INTERVAL_MS,
|
||||
BATTLE_NOTICE_VISIBLE_MS,
|
||||
clearBattleNotice,
|
||||
showBattleDeathNotice,
|
||||
} from "../ui/battleDeathNotice.js";
|
||||
} from "../../ui/battleDeathNotice.js";
|
||||
|
||||
export class ArenaScene extends Phaser.Scene {
|
||||
constructor({ getInitialMatchConfig, setStatus }) {
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ARENA_SIZE, GRID_SIZE, TILE_SIZE } from "../constants.js";
|
||||
import { ARENA_SIZE, GRID_SIZE, TILE_SIZE } from "../../constants.js";
|
||||
|
||||
export function drawArena(scene) {
|
||||
const graphics = scene.add.graphics();
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
SPECTATOR_FINAL_TEAM_TOTAL_THRESHOLD,
|
||||
SPECTATOR_LATE_FIGHTER_THRESHOLD,
|
||||
SPECTATOR_LATE_FIGHT_ZOOM,
|
||||
} from "../constants.js";
|
||||
} from "../../constants.js";
|
||||
|
||||
export function getSpectatorState(livingFighters) {
|
||||
const livingFighterCount = livingFighters.length;
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
SPELL_HIT_DELAY,
|
||||
RANGED_CRITICAL_CHANCE,
|
||||
RANGED_ATTACK_RANGE,
|
||||
} from "../constants.js";
|
||||
} from "../../constants.js";
|
||||
import {
|
||||
getAttackSpeedMultiplier,
|
||||
getMovementSpeedMultiplier,
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
fighterProjectileKey,
|
||||
healEffectAnimationKey,
|
||||
healEffectKey,
|
||||
} from "./fighterAssets.js";
|
||||
} from "../fighter/fighterAssets.js";
|
||||
|
||||
export function updateFighter(scene, fighter, time, onWinner) {
|
||||
const enemy = findNearestEnemy(scene.fighters, fighter);
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
SELECTED_FIGHTER_OUTLINE_ALPHA,
|
||||
SELECTED_FIGHTER_OUTLINE_GAP,
|
||||
SELECTED_FIGHTER_OUTLINE_WIDTH,
|
||||
} from "../constants.js";
|
||||
} from "../../constants.js";
|
||||
|
||||
const SOURCE_ALPHA_THRESHOLD = 8;
|
||||
const HEAL_EFFECT_PATH = "assets/effects/heal/Heal_Effect.png";
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
FIGHTER_HITBOX_WIDTH,
|
||||
FIGHTER_MAX_HP,
|
||||
FIGHTER_SCALE,
|
||||
} from "../constants.js";
|
||||
} from "../../constants.js";
|
||||
import {
|
||||
fighterAnimationKey,
|
||||
fighterOutlineSheetKeyFromSheetKey,
|
||||
@@ -1,5 +1,5 @@
|
||||
import Phaser from "phaser";
|
||||
import { ARENA_SIZE } from "../constants.js";
|
||||
import { ARENA_SIZE } from "../../constants.js";
|
||||
|
||||
const SPAWN_CLUSTER_MARGIN = 48;
|
||||
const SPAWN_CLUSTER_STEP = 28;
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
MAX_TEAM_SIZE,
|
||||
SPAWN_PLACEMENTS,
|
||||
TILE_SIZE,
|
||||
} from "../constants.js";
|
||||
} from "../../constants.js";
|
||||
|
||||
export function createMatchSetup(
|
||||
names,
|
||||
Reference in New Issue
Block a user