Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game-stydy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
谌继荃
game-stydy
Commits
cd591918
Commit
cd591918
authored
Nov 19, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
f2407cef
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
21 deletions
+23
-21
Movable.ts
src/lib/Movable.ts
+1
-1
MovableManager.ts
src/lib/MovableManager.ts
+0
-0
main.ts
src/main.ts
+1
-1
Enemy.ts
src/planewar/Enemy.ts
+6
-5
Hero.ts
src/planewar/Hero.ts
+6
-5
addGame.ts
src/planewar/addGame.ts
+5
-4
Bullet.ts
src/weapon/Bullet.ts
+1
-1
IWeaponHost.ts
src/weapon/IWeaponHost.ts
+1
-1
Weapon.ts
src/weapon/Weapon.ts
+2
-3
No files found.
src/Movable.ts
→
src/
lib/
Movable.ts
View file @
cd591918
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
;
...
...
src/MovableManager.ts
→
src/
lib/
MovableManager.ts
View file @
cd591918
File moved
src/main.ts
View file @
cd591918
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
...
...
src/Enemy.ts
→
src/
planewar/
Enemy.ts
View file @
cd591918
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
;
...
...
src/Hero.ts
→
src/
planewar/
Hero.ts
View file @
cd591918
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
{
...
...
src/addGame.ts
→
src/
planewar/
addGame.ts
View file @
cd591918
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
);
//创建管理器
...
...
src/Bullet.ts
→
src/
weapon/
Bullet.ts
View file @
cd591918
import
Movable
from
"./Movable"
;
import
Movable
from
".
./lib
/Movable"
;
export
default
class
Bullet
extends
Movable
{
export
default
class
Bullet
extends
Movable
{
constructor
()
{
constructor
()
{
...
...
src/weapon/IWeaponHost.ts
View file @
cd591918
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
;
...
...
src/weapon/Weapon.ts
View file @
cd591918
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment