Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
883e98bc
Commit
883e98bc
authored
Aug 21, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
55238fa0
0009ac82
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
16 deletions
+45
-16
ele6.png
egret/resource/assets/mainScene/ele6.png
+0
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+11
-4
Chapters.ts
egret/src/something/Chapters.ts
+1
-1
ImageAni.ts
egret/src/something/class/ImageAni.ts
+32
-11
GuideMsg.ts
egret/src/something/uis/GuideMsg.ts
+1
-0
No files found.
egret/resource/assets/mainScene/ele6.png
View replaced file @
55238fa0
View file @
883e98bc
8.3 KB
|
W:
|
H:
10.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/src/mainScene/MainScene.ts
View file @
883e98bc
...
@@ -253,13 +253,16 @@ export default class MainScene extends Scene {
...
@@ -253,13 +253,16 @@ export default class MainScene extends Scene {
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
parser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
parser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
mv
.
lockStep
=
true
;
mv
.
x
=
(
750
-
520
)
/
2
;
mv
.
x
=
(
750
-
520
)
/
2
;
mv
.
y
=
500
;
mv
.
y
=
500
;
mv
.
stop
();
mv
.
stop
();
let
fun
;
let
fun
;
mv
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
mv
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
e
.
target
.
stop
()
e
.
target
.
stop
()
if
(
e
.
target
.
parent
){
this
.
removeChild
(
e
.
target
)
this
.
removeChild
(
e
.
target
)
}
},
this
)
},
this
)
this
.
movieClips
[
svgas
[
i
]]
=
mv
;
this
.
movieClips
[
svgas
[
i
]]
=
mv
;
},
function
(
error
)
{
},
function
(
error
)
{
...
@@ -596,10 +599,9 @@ export default class MainScene extends Scene {
...
@@ -596,10 +599,9 @@ export default class MainScene extends Scene {
//购买弹框
//购买弹框
PanelCtrl
.
instance
.
show
(
"Buy3"
,
{})
PanelCtrl
.
instance
.
show
(
"Buy3"
,
{})
}
else
{
}
else
{
//再写
//再写
,成功后请求home接口,然后执行updateScene
NetManager
.
ins
.
hc_useProp
((
s
)
=>
{
NetManager
.
ins
.
hc_useProp
((
s
)
=>
{
if
(
s
){
if
(
s
)
{
}
}
},
PropType
.
CHANCE_NUM
)
},
PropType
.
CHANCE_NUM
)
}
}
...
@@ -1860,6 +1862,11 @@ export default class MainScene extends Scene {
...
@@ -1860,6 +1862,11 @@ export default class MainScene extends Scene {
if
(
sv
&&
this
.
movieClips
[
sv
])
{
if
(
sv
&&
this
.
movieClips
[
sv
])
{
this
.
addChild
(
this
.
movieClips
[
sv
])
this
.
addChild
(
this
.
movieClips
[
sv
])
this
.
movieClips
[
sv
].
gotoAndPlay
(
1
,
true
)
this
.
movieClips
[
sv
].
gotoAndPlay
(
1
,
true
)
setTimeout
(()
=>
{
if
(
this
.
movieClips
[
sv
].
parent
){
this
.
removeChild
(
this
.
movieClips
[
sv
])
}
},
667
)
}
}
this
.
oneStepScore
=
0
;
this
.
oneStepScore
=
0
;
}
}
...
...
egret/src/something/Chapters.ts
View file @
883e98bc
...
@@ -35,7 +35,7 @@ export const Chapters: ChapterData[] = [
...
@@ -35,7 +35,7 @@ export const Chapters: ChapterData[] = [
],
],
connectedLats
:
[[
27
,
45
],
[
28
,
46
],
[
29
,
47
]]
connectedLats
:
[[
27
,
45
],
[
28
,
46
],
[
29
,
47
]]
},
},
baseElementTypes
:
[
0
,
1
,
2
,
3
],
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
effectInitProbability
:
0.15
,
effectInitProbability
:
0.15
,
stepCount
:
30
,
stepCount
:
30
,
passTarget
:
{
passTarget
:
{
...
...
egret/src/something/class/ImageAni.ts
View file @
883e98bc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
/**
/**
* 直接通过替换source替换图片的动画帧
* 直接通过替换source替换图片的动画帧
* 暂时这些动画帧只播放一次,所以简化
* 暂时这些动画帧只播放一次,所以简化
* 默认按时间间隔播放
* 图片都以素材为中心为原点
* 图片都以素材为中心为原点
*/
*/
export
class
ImageAni
extends
eui
.
Image
{
export
class
ImageAni
extends
eui
.
Image
{
...
@@ -10,6 +11,11 @@ export class ImageAni extends eui.Image {
...
@@ -10,6 +11,11 @@ export class ImageAni extends eui.Image {
totalFrames
:
number
;
totalFrames
:
number
;
isPlay
:
boolean
;
isPlay
:
boolean
;
startTime
:
number
/**
* 所有时间,帧数按每秒30
*/
allTime
:
number
/**
/**
* 播放完的回调
* 播放完的回调
*/
*/
...
@@ -28,22 +34,36 @@ export class ImageAni extends eui.Image {
...
@@ -28,22 +34,36 @@ export class ImageAni extends eui.Image {
this
.
currentFrame
=
0
;
this
.
currentFrame
=
0
;
this
.
totalFrames
=
sourceAll
.
length
;
this
.
totalFrames
=
sourceAll
.
length
;
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
)
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
)
}
this
.
allTime
=
this
.
sourceAll
.
length
/
30
*
1000
;
}
//需要做锁步
private
count
=
0
;
private
count
=
0
;
onEnterFrame
()
{
onEnterFrame
()
{
if
(
!
this
.
isPlay
)
{
if
(
!
this
.
isPlay
)
{
this
.
count
=
0
//
this.count = 0
return
return
}
}
this
.
count
++
;
// this.count++;
if
(
this
.
count
%
2
==
0
)
{
// if (this.count % 2 == 0) {
this
.
currentFrame
++
;
// this.currentFrame++;
if
(
this
.
currentFrame
==
this
.
totalFrames
/*-1*/
)
{
// if (this.currentFrame == this.totalFrames/*-1*/) {
this
.
currentFrame
=
0
;
// this.currentFrame = 0;
// this.isPlay = false
// this.callback && this.callback();
// }
// this.texture = RES.getRes(this.sourceAll[this.currentFrame])
// this.x = -this.texture.textureWidth / 2;
// this.y = -this.texture.textureHeight / 2;
// }
var
dataNow
=
Date
.
now
();
var
deltaTime
=
dataNow
-
this
.
startTime
;
var
scale
=
deltaTime
/
this
.
allTime
;
if
(
scale
>=
1
)
{
this
.
isPlay
=
false
this
.
isPlay
=
false
this
.
callback
&&
this
.
callback
();
this
.
callback
&&
this
.
callback
();
}
}
else
{
this
.
currentFrame
=
(
scale
*
this
.
sourceAll
.
length
)
>>
0
;
this
.
texture
=
RES
.
getRes
(
this
.
sourceAll
[
this
.
currentFrame
])
this
.
texture
=
RES
.
getRes
(
this
.
sourceAll
[
this
.
currentFrame
])
this
.
x
=
-
this
.
texture
.
textureWidth
/
2
;
this
.
x
=
-
this
.
texture
.
textureWidth
/
2
;
this
.
y
=
-
this
.
texture
.
textureHeight
/
2
;
this
.
y
=
-
this
.
texture
.
textureHeight
/
2
;
...
@@ -54,7 +74,8 @@ export class ImageAni extends eui.Image {
...
@@ -54,7 +74,8 @@ export class ImageAni extends eui.Image {
* 回调是播放完后做回收用的
* 回调是播放完后做回收用的
*/
*/
play
(
callback
)
{
play
(
callback
)
{
this
.
isPlay
=
true
this
.
startTime
=
Date
.
now
();
this
.
isPlay
=
true
;
this
.
currentFrame
=
0
;
this
.
currentFrame
=
0
;
this
.
texture
=
RES
.
getRes
(
this
.
sourceAll
[
this
.
currentFrame
])
this
.
texture
=
RES
.
getRes
(
this
.
sourceAll
[
this
.
currentFrame
])
this
.
x
=
-
this
.
texture
.
textureWidth
/
2
;
this
.
x
=
-
this
.
texture
.
textureWidth
/
2
;
...
...
egret/src/something/uis/GuideMsg.ts
View file @
883e98bc
...
@@ -62,6 +62,7 @@ export class GuideMsg extends egret.DisplayObjectContainer {
...
@@ -62,6 +62,7 @@ export class GuideMsg extends egret.DisplayObjectContainer {
}
else
{
}
else
{
parser
.
load
(
resPath
+
'resource/assets/svgas/'
+
'guide'
+
num
+
'.svga'
,
(
videoItem
)
=>
{
parser
.
load
(
resPath
+
'resource/assets/svgas/'
+
'guide'
+
num
+
'.svga'
,
(
videoItem
)
=>
{
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
mv
.
lockStep
=
true
;
mv
.
x
=
3
;
mv
.
x
=
3
;
mv
.
y
=
-
263
;
mv
.
y
=
-
263
;
this
.
moiveClip
=
mv
;
this
.
moiveClip
=
mv
;
...
...
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