Skip to content

Commit

Permalink
refactor(*): fix pathes
Browse files Browse the repository at this point in the history
  • Loading branch information
neki-dev committed Oct 9, 2024
1 parent 85c22a1 commit dccdc78
Show file tree
Hide file tree
Showing 21 changed files with 28 additions and 30 deletions.
3 changes: 2 additions & 1 deletion src/game/scenes/gameover/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Interface } from 'phaser-react-ui';

import { GameoverUI } from './interface';
import { Scene } from '..';
import { GameScene } from '../../types';

import { GameScene } from '~game/types';

export class Gameover extends Scene {
constructor() {
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/menu/interface/content/new-game/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import React, { useMemo, useState } from 'react';

import { Param } from './param';
import { Record } from './record';
import { GameDifficulty } from '../../../../../types';

import type { IGame } from '../../../../../types';
import type { IGame } from '~game/types';

import { GameDifficulty } from '~game/types';
import { phrase } from '~lib/lang';
import { Button } from '~scene/system/interface/button';
import { LevelPlanet } from '~scene/world/level/types';
Expand Down
5 changes: 2 additions & 3 deletions src/game/scenes/menu/interface/navigation/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { useGame } from 'phaser-react-ui';
import React, { useMemo, useState } from 'react';

import { GameState } from '../../../../types';

import type { IGame } from '../../../../types';
import type { IGame } from '~game/types';
import type { LangPhrase } from '~lib/lang/types';
import type { MenuItem } from '~scene/menu/types';

import { GameState } from '~game/types';
import { phrase } from '~lib/lang';
import { Tutorial } from '~lib/tutorial';
import { MenuPage } from '~scene/menu/types';
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/screen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import VirtualJoystick from 'phaser3-rex-plugins/plugins/virtualjoystick';
import { ScreenUI } from './interface';
import { ScreenAudio, ScreenEvent } from './types';
import { Scene } from '..';
import { GameScene } from '../../types';

import type { IScreen } from './types';
import type { LangPhrase } from '~lib/lang/types';

import { GameScene } from '~game/types';
import { Assets } from '~lib/assets';
import { INTERFACE_SCALE } from '~lib/interface/const';

Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/screen/interface/builder/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { useGame, useScene, useSceneUpdate } from 'phaser-react-ui';
import React, { useEffect, useMemo, useState } from 'react';

import { Building } from './building';
import { GameScene } from '../../../../types';

import type { IGame } from '../../../../types';
import type { IGame } from '~game/types';
import type { LangPhrase } from '~lib/lang/types';
import type { IWorld } from '~scene/world/types';

import { GameScene } from '~game/types';
import { phrase } from '~lib/lang';
import { Tutorial } from '~lib/tutorial';
import { TutorialStep } from '~lib/tutorial/types';
Expand Down
3 changes: 1 addition & 2 deletions src/game/scenes/screen/interface/modes/item/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Texture, useInteraction, useScene } from 'phaser-react-ui';
import React, { useRef, useState } from 'react';

import { GameScene } from '../../../../../types';

import type { IWorld, WorldMode } from '~scene/world/types';

import { GameScene } from '~game/types';
import { phrase } from '~lib/lang';
import { WorldModeIcon } from '~scene/world/types';

Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/screen/interface/skills/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';

import { Modal } from './modal';

import type { IGame } from '../../../../types';
import type { IGame } from '~game/types';

import { phrase } from '~lib/lang';
import { Tutorial } from '~lib/tutorial';
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/screen/interface/superskills/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { useEvent, useScene } from 'phaser-react-ui';
import React, { useMemo, useState } from 'react';

import { Item } from './item';
import { GameScene } from '../../../../types';

import type { IWorld } from '~scene/world/types';

import { GameScene } from '~game/types';
import { PlayerSuperskill, PlayerEvent } from '~scene/world/entities/player/types';

import { Wrapper } from './styles';
Expand Down
5 changes: 2 additions & 3 deletions src/game/scenes/screen/interface/superskills/item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import {
} from 'phaser-react-ui';
import React, { useRef, useState } from 'react';

import { GameScene, GameEvent } from '../../../../../types';

import type { IGame } from '../../../../../types';
import type { IGame } from '~game/types';
import type { PlayerSuperskill } from '~scene/world/entities/player/types';
import type { IWorld } from '~scene/world/types';

import { GameScene, GameEvent } from '~game/types';
import { phrase } from '~lib/lang';
import { Cost } from '~scene/system/interface/cost';
import { PlayerEvent, PlayerSuperskillIcon } from '~scene/world/entities/player/types';
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/screen/interface/unlocks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { useEvent, useGame, useScene } from 'phaser-react-ui';
import React, { useEffect, useState } from 'react';

import { Modal } from './modal';
import { GameScene } from '../../../../types';

import type { IGame } from '../../../../types';
import type { IGame } from '~game/types';
import type { AssistantVariant } from '~scene/world/entities/npc/assistant/types';
import type { PlayerSuperskill } from '~scene/world/entities/player/types';
import type { IWorld } from '~scene/world/types';

import { GameScene } from '~game/types';
import { BuildingVariant } from '~scene/world/entities/building/types';
import { AssistantEvent } from '~scene/world/entities/npc/assistant/types';
import { PlayerEvent } from '~scene/world/entities/player/types';
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/system/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Scene } from '..';
import { GameScene, GameState } from '../../types';

import { GameScene, GameState } from '~game/types';
import { Assets } from '~lib/assets';
import { CONTROL_KEY } from '~lib/controls/const';
import { InterfaceFont } from '~lib/interface/types';
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/system/interface/building-info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React, { useEffect, useMemo, useState } from 'react';

import { Controls } from './controls';
import { Params } from './params';
import { GameScene } from '../../../../types';

import type { IBuilding, BuildingParam, BuildingControl } from '~scene/world/entities/building/types';
import type { IWorld } from '~scene/world/types';

import { GameScene } from '~game/types';
import { phrase } from '~lib/lang';

import { Name, Level, Health, Wrapper, Head, Body, Container } from './styles';
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/world/entities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Indicator } from './addons/indicator';
import { Live } from './addons/live';
import { LiveEvent } from './addons/live/types';
import { EntityType } from './types';
import { DEBUG_MODS } from '../../../const';
import { WORLD_COLLIDE_SPEED_FACTOR, WORLD_DEPTH_GRAPHIC } from '../const';
import { Level } from '../level';

Expand All @@ -14,6 +13,7 @@ import type { ISprite, SpriteData, SpriteBodyData, SpriteIndicatorData } from '.
import type { LevelBiome, PositionAtMatrix, TileType, PositionAtWorld } from '../level/types';
import type { IWorld } from '../types';

import { DEBUG_MODS } from '~game/const';
import { isPositionsEqual } from '~lib/dimension';

export class Sprite extends Phaser.Physics.Arcade.Sprite implements ISprite {
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/world/entities/npc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import Phaser from 'phaser';

import { NPC_PATH_FIND_RATE } from './const';
import { Sprite } from '..';
import { DEBUG_MODS } from '../../../../const';
import { EntityType } from '../types';

import type { INPC, NPCData } from './types';
import type { PositionAtWorld } from '~scene/world/level/types';
import type { IWorld } from '~scene/world/types';

import { DEBUG_MODS } from '~game/const';
import { isPositionsEqual, getIsometricDistance, getIsometricAngle } from '~lib/dimension';
import { WORLD_DEPTH_GRAPHIC } from '~scene/world/const';
import { Level } from '~scene/world/level';
Expand Down
3 changes: 2 additions & 1 deletion src/game/scenes/world/fx-manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Effect } from './effect';
import { EffectTexture } from './effect/types';
import { Particles } from './particles';
import { ParticlesTexture } from './particles/types';
import { GameSettings } from '../../../types';

import type { IParticlesParent } from './particles/types';
import type { IFXManager, SoundParams } from './types';
Expand All @@ -14,6 +13,8 @@ import type { ISprite } from '../entities/types';
import type { PositionAtWorld } from '../level/types';
import type { IWorld } from '../types';

import { GameSettings } from '~game/types';

export class FXManager implements IFXManager {
private scene: IWorld;

Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/world/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { WorldModeIcon, WorldMode, WorldEvent } from './types';
import { Wave } from './wave';
import { WaveEvent } from './wave/types';
import { Scene } from '..';
import { GameScene, GameState, GameEvent } from '../../types';

import type { IBuilder } from './builder/types';
import type { ICamera } from './camera/types';
Expand All @@ -36,6 +35,7 @@ import type { IWorld, WorldHint, WorldTimerParams, WorldSavePayload } from './ty
import type { IWave } from './wave/types';

import { DIFFICULTY } from '~game/difficulty';
import { GameScene, GameState, GameEvent } from '~game/types';
import { Assets } from '~lib/assets';
import { aroundPosition } from '~lib/dimension';
import { progressionLinear } from '~lib/progression';
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/world/interface/crystals-amount/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React, { useEffect, useState } from 'react';
import { v4 as uuidv4 } from 'uuid';

import { Amount } from './amount';
import { GameScene } from '../../../../types';

import type { CrystalAmount, ICrystal } from '~scene/world/entities/crystal/types';
import type { IWorld } from '~scene/world/types';

import { GameScene } from '~game/types';
import { CrystalEvents } from '~scene/world/entities/crystal/types';
import { EntityType } from '~scene/world/entities/types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {
import React, { useEffect, useState } from 'react';

import { TranslateToScreen } from './translate-to-screen';
import { GameScene } from '../../../../types';

import type { IBuilding } from '~scene/world/entities/building/types';
import type { IWorld } from '~scene/world/types';

import { GameScene } from '~game/types';
import { INTERFACE_MOBILE_BREAKPOINT, INTERFACE_SCALE } from '~lib/interface/const';
import { BuildingInfo } from '~scene/system/interface/building-info';
import { WorldEvent } from '~scene/world/types';
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/world/interface/relative-hints/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { useScene } from 'phaser-react-ui';
import React, { useEffect, useState } from 'react';

import { RelativeHint } from './relative-hint';
import { GameScene } from '../../../../types';

import type { IWorld, WorldHint } from '~scene/world/types';

import { GameScene } from '~game/types';
import { WorldEvent } from '~scene/world/types';

export const RelativeHints: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import {
} from 'phaser-react-ui';
import React, { useRef, useState } from 'react';

import { GameScene } from '../../../../../types';

import type { PositionAtWorld } from '~scene/world/level/types';
import type { WorldHint, IWorld } from '~scene/world/types';

import { GameScene } from '~game/types';
import { isPositionsEqual } from '~lib/dimension';
import { INTERFACE_SCALE } from '~lib/interface/const';
import { Hint } from '~scene/system/interface/hint';
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/world/level/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
SpawnTarget,
TileType,
} from './types';
import { GameEvent, GameSettings } from '../../../types';

import type { ITile } from './tile-matrix/types';
import type {
Expand All @@ -37,6 +36,7 @@ import type { IWorld } from '../types';
import type { World } from 'gen-biome';
import type { INavigator } from '~lib/navigator/types';

import { GameEvent, GameSettings } from '~game/types';
import { Assets } from '~lib/assets';
import { isPositionsEqual } from '~lib/dimension';
import { Navigator } from '~lib/navigator';
Expand Down

0 comments on commit dccdc78

Please sign in to comment.