Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CS375_Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ah3472
CS375_Project
Commits
daa2976d
Commit
daa2976d
authored
Aug 27, 2020
by
Jacky Chen
Browse files
Options
Downloads
Patches
Plain Diff
updated gun, enemy
parent
75400400
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
homepage_html/classes/enemy.js
+1
-0
1 addition, 0 deletions
homepage_html/classes/enemy.js
homepage_html/classes/gun.js
+22
-3
22 additions, 3 deletions
homepage_html/classes/gun.js
with
23 additions
and
3 deletions
homepage_html/classes/enemy.js
+
1
−
0
View file @
daa2976d
...
...
@@ -10,6 +10,7 @@ class Enemy {
this
.
width
=
64
;
this
.
height
=
64
;
this
.
sprite
=
null
;
this
.
lootbox
=
false
;
}
addToObjectsList
(
objectList
)
{
...
...
...
...
This diff is collapsed.
Click to expand it.
homepage_html/classes/gun.js
+
22
−
3
View file @
daa2976d
...
...
@@ -8,8 +8,6 @@ let length;
let
g
;
let
gunAnim
=
{};
class
gun
{
constructor
(
x
,
y
,
weapon
,
f_ammo
,
t_ammo
,
dmg
){
this
.
x
=
x
;
...
...
@@ -25,6 +23,7 @@ class gun{
app
.
loader
.
add
(
"
default
"
,
"
../art/Player/Gun/pistol_sheet.png
"
);
app
.
loader
.
add
(
"
awpGun
"
,
"
../art/Player/Gun/Awp.png
"
);
app
.
loader
.
add
(
"
smgGun
"
,
"
../art/Player/Gun/smg.png
"
);
app
.
loader
.
add
(
"
pistolR
"
,
"
../art/Player/Gun/reload_sprite.png
"
);
g
=
this
;
c_amt
=
this
.
f_ammo
;
...
...
@@ -156,6 +155,7 @@ class gun{
let
gun_sheet
=
new
PIXI
.
BaseTexture
.
from
(
app
.
loader
.
resources
[
"
default
"
].
url
);
let
awp_sheet
=
new
PIXI
.
BaseTexture
.
from
(
app
.
loader
.
resources
[
"
awpGun
"
].
url
);
let
smg_sheet
=
new
PIXI
.
BaseTexture
.
from
(
app
.
loader
.
resources
[
"
smgGun
"
].
url
);
let
reload_pistol
=
new
PIXI
.
BaseTexture
.
from
(
app
.
loader
.
resources
[
"
pistolR
"
].
url
);
let
width
=
64
;
let
height
=
64
;
...
...
@@ -176,7 +176,26 @@ class gun{
gunAnim
[
"
smg
"
]
=
[
new
PIXI
.
Texture
(
smg_sheet
,
new
PIXI
.
Rectangle
(
0
*
width
,
0
,
width
,
height
))
]
];
gunAnim
[
"
pistolR
"
]
=
[
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
0
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
1
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
2
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
3
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
4
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
5
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
6
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
7
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
7
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
8
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
8
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
9
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
10
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
11
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
12
*
width
,
0
,
width
,
height
)),
new
PIXI
.
Texture
(
reload_pistol
,
new
PIXI
.
Rectangle
(
0
*
width
,
0
,
width
,
height
))
];
}
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment