Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-libs
Commits
f1341317
Commit
f1341317
authored
Sep 16, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
6dff793e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
8 deletions
+24
-8
app.js
src/custom/rbcxbingqiu/debug/app.js
+1
-1
Ball.ts
src/custom/rbcxbingqiu/src/game/Game/Ball.ts
+4
-3
Game.ts
src/custom/rbcxbingqiu/src/game/Game/Game.ts
+2
-2
SpBoomEffect.ts
src/custom/rbcxbingqiu/src/game/Game/SpBoomEffect.ts
+1
-1
MConst.ts
src/custom/rbcxbingqiu/src/game/Global/MConst.ts
+1
-1
GuideMgr.ts
src/custom/rbcxbingqiu/src/game/Mgr/GuideMgr.ts
+11
-0
SoundMgr.ts
src/custom/rbcxbingqiu/src/game/Mgr/SoundMgr.ts
+1
-0
BallPool.ts
src/custom/rbcxbingqiu/src/game/Pools/BallPool.ts
+2
-0
ShootPlanet.ts
src/custom/rbcxbingqiu/src/game/ShootPlanet.ts
+1
-0
No files found.
src/custom/rbcxbingqiu/debug/app.js
View file @
f1341317
...
@@ -47,7 +47,7 @@ function launchWithCustomModule(customModule) {
...
@@ -47,7 +47,7 @@ function launchWithCustomModule(customModule) {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
engine
.
globalEvent
.
dispatchEvent
(
'bqgame-start'
,
{
engine
.
globalEvent
.
dispatchEvent
(
'bqgame-start'
,
{
guide
:
tru
e
guide
:
fals
e
});
});
},
510
);
},
510
);
...
...
src/custom/rbcxbingqiu/src/game/Game/Ball.ts
View file @
f1341317
...
@@ -327,9 +327,10 @@ export default class Ball extends MoveObjcet implements PoolElement {
...
@@ -327,9 +327,10 @@ export default class Ball extends MoveObjcet implements PoolElement {
drop
.
physics
.
velocity
.
y
=
-
(
x
*
5
*
MUtils
.
random
(
0.9
,
1.1
));
drop
.
physics
.
velocity
.
y
=
-
(
x
*
5
*
MUtils
.
random
(
0.9
,
1.1
));
if
(
GuideMgr
.
instance
.
guideFlag
&&
i
==
1
)
{
if
(
GuideMgr
.
instance
.
guideFlag
&&
i
==
1
)
{
MTimer
.
setFrameTimer
(
20
,
()
=>
{
// MTimer.setFrameTimer(20, () => {
GuideMgr
.
instance
.
runGuide
(
1
,
Math
.
floor
(
drop
.
x
),
Math
.
floor
(
drop
.
y
),
true
);
// GuideMgr.instance.runGuide(1, Math.floor(drop.x), Math.floor(drop.y), true);
});
// });
GuideMgr
.
instance
.
setGuideTwo
(
1
);
}
}
}
}
}
}
...
...
src/custom/rbcxbingqiu/src/game/Game/Game.ts
View file @
f1341317
...
@@ -165,8 +165,8 @@ export default class Game {
...
@@ -165,8 +165,8 @@ export default class Game {
this
.
node
.
width
=
MConst
.
DesignResolution
.
width
;
this
.
node
.
width
=
MConst
.
DesignResolution
.
width
;
this
.
node
.
height
=
MConst
.
DesignResolution
.
height
;
this
.
node
.
height
=
MConst
.
DesignResolution
.
height
;
let
bg
=
new
engine
.
Image
(
getTexture
(
"d99368b8-af5d-4d9e-981e-7bce3e1c1e84"
));
//
let bg = new engine.Image(getTexture("d99368b8-af5d-4d9e-981e-7bce3e1c1e84"));
this
.
node
.
addChild
(
bg
);
//
this.node.addChild(bg);
//子弹层
//子弹层
this
.
node
.
addChild
(
this
.
layers
.
bullet
);
this
.
node
.
addChild
(
this
.
layers
.
bullet
);
//炮车
//炮车
...
...
src/custom/rbcxbingqiu/src/game/Game/SpBoomEffect.ts
View file @
f1341317
...
@@ -88,7 +88,7 @@ class SpBoomEffect extends engine.Container implements PoolElement {
...
@@ -88,7 +88,7 @@ class SpBoomEffect extends engine.Container implements PoolElement {
constructor
(
color
:
number
,
size
:
number
)
{
constructor
(
color
:
number
,
size
:
number
)
{
super
();
super
();
this
.
scaleX
=
this
.
scaleY
=
0.5
*
size
+
0.5
;
this
.
scaleX
=
this
.
scaleY
=
1
*
size
+
1
;
this
.
rotation
=
MUtils
.
random
(
0
,
90
);
this
.
rotation
=
MUtils
.
random
(
0
,
90
);
for
(
let
i
=
0
;
i
<
16
;
i
++
)
{
for
(
let
i
=
0
;
i
<
16
;
i
++
)
{
let
line
=
new
Line
(
this
,
i
%
2
,
color
,
i
*
22.5
);
let
line
=
new
Line
(
this
,
i
%
2
,
color
,
i
*
22.5
);
...
...
src/custom/rbcxbingqiu/src/game/Global/MConst.ts
View file @
f1341317
...
@@ -5,7 +5,7 @@ export namespace MConst {
...
@@ -5,7 +5,7 @@ export namespace MConst {
height
:
1624
height
:
1624
};
};
export
const
GroundLine
=
1110
;
export
let
GroundLine
=
1330
;
//
1110;
export
const
BulletFireSpeed
=
{
export
const
BulletFireSpeed
=
{
min
:
10
,
min
:
10
,
max
:
20
max
:
20
...
...
src/custom/rbcxbingqiu/src/game/Mgr/GuideMgr.ts
View file @
f1341317
...
@@ -50,7 +50,18 @@ export default class GuideMgr {
...
@@ -50,7 +50,18 @@ export default class GuideMgr {
if
(
end
)
{
if
(
end
)
{
this
.
guideFlag
=
false
;
this
.
guideFlag
=
false
;
}
}
engine
.
globalEvent
.
dispatchEvent
(
"bqgame_ctrl"
,{
istop
:
"false"
})
};
};
this
.
_container
.
addChild
(
this
.
currentGuideMask
);
this
.
_container
.
addChild
(
this
.
currentGuideMask
);
}
}
public
setGuideTwo
(
index
){
this
.
done
.
push
(
index
);
if
(
this
.
done
.
length
>=
Object
.
keys
(
MConfigs
.
guide
).
length
){
DataMgr
.
game
.
onGuideDone
();
}
this
.
guideFlag
=
false
;
}
}
}
\ No newline at end of file
src/custom/rbcxbingqiu/src/game/Mgr/SoundMgr.ts
View file @
f1341317
...
@@ -15,6 +15,7 @@ export default class SoundMgr {
...
@@ -15,6 +15,7 @@ export default class SoundMgr {
}
}
public
playEffect
(
name
:
string
,
loop
:
boolean
=
false
)
{
public
playEffect
(
name
:
string
,
loop
:
boolean
=
false
)
{
return
;
if
(
!
this
.
enabled
)
return
;
if
(
!
this
.
enabled
)
return
;
engine
.
playSound
(
getAssetByUUID
(
nameToUuid
[
name
]).
uuid
,
{
engine
.
playSound
(
getAssetByUUID
(
nameToUuid
[
name
]).
uuid
,
{
...
...
src/custom/rbcxbingqiu/src/game/Pools/BallPool.ts
View file @
f1341317
...
@@ -6,9 +6,11 @@ class BallPool extends Pool<Ball>{
...
@@ -6,9 +6,11 @@ class BallPool extends Pool<Ball>{
public
spwan
(
sizeIndex
:
number
)
{
public
spwan
(
sizeIndex
:
number
)
{
let
element
:
Ball
=
null
;
let
element
:
Ball
=
null
;
if
(
this
.
data
.
length
>
0
)
{
if
(
this
.
data
.
length
>
0
)
{
// console.log("复用========Ball");
element
=
this
.
data
.
shift
();
element
=
this
.
data
.
shift
();
element
.
onElementInit
();
element
.
onElementInit
();
}
else
{
}
else
{
// console.error("new==========Ball");
element
=
new
Ball
(
sizeIndex
);
element
=
new
Ball
(
sizeIndex
);
this
.
layer
.
addChild
(
element
);
this
.
layer
.
addChild
(
element
);
}
}
...
...
src/custom/rbcxbingqiu/src/game/ShootPlanet.ts
View file @
f1341317
...
@@ -46,6 +46,7 @@ export class ShootPlanet extends engine.Container {
...
@@ -46,6 +46,7 @@ export class ShootPlanet extends engine.Container {
public
onActive
()
{
public
onActive
()
{
if
(
!
this
.
game
){
if
(
!
this
.
game
){
console
.
error
(
"新建game========"
);
this
.
game
=
new
Game
(
this
);
this
.
game
=
new
Game
(
this
);
}
}
// this.setChildIndex(this.testbtn,100);
// this.setChildIndex(this.testbtn,100);
...
...
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