Commit cd591918 authored by wildfirecode13's avatar wildfirecode13

init

parent f2407cef
import Vector2 from "./lib/Vector2"; import Vector2 from "./Vector2";
export default class Movable extends FYGE.Sprite { export default class Movable extends FYGE.Sprite {
private _velocity: Vector2; private _velocity: Vector2;
......
import { addGame } from "./addGame"; import { addGame } from "./planewar/addGame";
var canvas: any = document.getElementById("canvas") var canvas: any = document.getElementById("canvas")
canvas.width = document.body.clientWidth * 1 canvas.width = document.body.clientWidth * 1
canvas.height = document.body.clientHeight * 1 canvas.height = document.body.clientHeight * 1
......
import Vector2 from "./lib/Vector2"; import Movable from "../lib/Movable";
import Movable from "./Movable"; import MovableManager from "../lib/MovableManager";
import MovableManager from "./MovableManager"; import Vector2 from "../lib/Vector2";
import { IWeaponHost } from "./weapon/IWeaponHost"; import { IWeaponHost } from "../weapon/IWeaponHost";
import Weapon from "./weapon/Weapon"; import Weapon from "../weapon/Weapon";
export default class Enemy extends Movable implements IWeaponHost { export default class Enemy extends Movable implements IWeaponHost {
movableManager: MovableManager; movableManager: MovableManager;
......
import DragDropable from "./dragdrop/DragDropable"; import DragDropable from "../dragdrop/DragDropable";
import Vector2 from "./lib/Vector2"; import MovableManager from "../lib/MovableManager";
import MovableManager from "./MovableManager"; import Vector2 from "../lib/Vector2";
import { IWeaponHost } from "./weapon/IWeaponHost"; import { IWeaponHost } from "../weapon/IWeaponHost";
import Weapon from "./weapon/Weapon"; import Weapon from "../weapon/Weapon";
export default class Hero extends DragDropable implements IWeaponHost { export default class Hero extends DragDropable implements IWeaponHost {
......
import DragDropable from "./dragdrop/DragDropable"; import DragDropable from "../dragdrop/DragDropable";
import DragDropManager from "./dragdrop/DragDropManager"; import DragDropManager from "../dragdrop/DragDropManager";
import MovableManager from "../lib/MovableManager";
import Vector2 from "../lib/Vector2";
import Enemy from "./Enemy"; import Enemy from "./Enemy";
import Hero from "./Hero"; import Hero from "./Hero";
import Vector2 from "./lib/Vector2";
import MovableManager from "./MovableManager";
export function addGame(stage: FYGE.Stage) { export function addGame(stage: FYGE.Stage) {
const movableManager = new MovableManager(stage);//创建管理器 const movableManager = new MovableManager(stage);//创建管理器
......
import Movable from "./Movable"; import Movable from "../lib/Movable";
export default class Bullet extends Movable { export default class Bullet extends Movable {
constructor() { constructor() {
......
import MovableManager from "../lib/MovableManager";
import Vector2 from "../lib/Vector2"; import Vector2 from "../lib/Vector2";
import MovableManager from "../MovableManager";
export interface IWeaponHost extends FYGE.Sprite { export interface IWeaponHost extends FYGE.Sprite {
movableManager: MovableManager; movableManager: MovableManager;
......
import Bullet from "../Bullet"; import Movable from "../lib/Movable";
import Vector2 from "../lib/Vector2"; import Bullet from "./Bullet";
import Movable from "../Movable";
import { IWeaponHost } from "./IWeaponHost"; import { IWeaponHost } from "./IWeaponHost";
export default class Weapon { export default class Weapon {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment