Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
4c09b2cb
Commit
4c09b2cb
authored
Nov 25, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8197e620
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
26 deletions
+8
-26
HisDreamScene.ts
egret/src/HisDreamScene.ts
+4
-25
IntroScene.ts
egret/src/IntroScene.ts
+4
-1
No files found.
egret/src/HisDreamScene.ts
View file @
4c09b2cb
...
...
@@ -5,9 +5,9 @@ import { showToast } from "../libs/new_wx/ctrls/toastCtrl";
import
{
DataManager
}
from
"../libs/tw/manager/DataManager"
;
import
join_1_index
from
"./interfaces/join_1_index"
;
import
{
getProvince
}
from
"./MyDreamScene"
;
import
{
NetManager
}
from
"../libs/tw/manager/NetManager"
;
export
default
class
HisDreamScene
extends
Scene
{
type
;
async
start
(
type
?)
{
this
.
showlog
();
...
...
@@ -41,9 +41,6 @@ export default class HisDreamScene extends Scene {
this
[
'group'
].
removeChild
(
this
[
'status5'
]);
this
[
'group'
].
removeChild
(
this
[
'status6'
]);
this
.
status
=
type
;
// if (type == HisDreamType.SHARE)
// this['group'].removeChild(this['back']);
this
[
'helpbtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap_helpbtn
,
this
);
...
...
@@ -73,24 +70,6 @@ export default class HisDreamScene extends Scene {
loadImg
(
url
)
{
RES
.
getResByUrl
(
url
,
(
img
:
egret
.
Texture
)
=>
{
// if (this.type == HisDreamType.SHARE) {
// this['imgGroup'].height = this['imgbg'].height;
// const maskRatio = this['imgMask'].width / this['imgMask'].height;
// this['img'].source = img;
// const imgRatio = img.textureWidth / img.textureHeight;
// if (imgRatio < maskRatio) {
// const scale = this['imgMask'].width / img.textureWidth;
// this['img'].width = this['imgMask'].width;
// this['img'].height = img.textureHeight * scale;
// this['img'].y = 5.1 - this['img'].height / 2 + this['imgMask'].height / 2;
// } else {
// const scale2 = this['imgMask'].height / img.textureHeight;
// this['img'].height = this['imgMask'].height;
// this['img'].width = img.textureWidth * scale2;
// this['img'].x = 31.7 - this['img'].width / 2 + this['imgMask'].width / 2;
// }
// }
// else {
const
oriHeight
=
this
[
'img'
].
height
;
const
scale
=
this
[
'imgMask'
].
width
/
img
.
textureWidth
;
this
[
'img'
].
source
=
img
;
...
...
@@ -98,8 +77,6 @@ export default class HisDreamScene extends Scene {
const
addHeight
=
this
[
'img'
].
height
-
oriHeight
;
this
[
'imgMask'
].
height
=
this
[
'img'
].
height
;
this
[
'imgbg'
].
height
=
this
[
'imgbg'
].
height
+
addHeight
;
// }
},
this
,
RES
.
ResourceItem
.
TYPE_IMAGE
)
}
...
...
@@ -107,7 +84,9 @@ export default class HisDreamScene extends Scene {
console
.
log
(
'onTap_sharebtn'
)
}
onTap_ruleBtn
()
{
SceneCtrl
.
instance
.
change
(
'MainScene'
);
NetManager
.
ins
.
yyh_join1_index
(
async
(
success
)
=>
{
SceneCtrl
.
instance
.
change
(
'MainScene'
);
});
}
get
skinKey
()
{
return
'HisDream'
}
...
...
egret/src/IntroScene.ts
View file @
4c09b2cb
...
...
@@ -4,6 +4,7 @@ import { HtmlTextParser } from "../libs/new_wx/HtmlTextParser";
import
{
DataManager
}
from
"../libs/tw/manager/DataManager"
;
import
getsubmitUrl
from
"./getsubmitUrl"
;
import
join_1_index
from
"./interfaces/join_1_index"
;
import
{
NetManager
}
from
"../libs/tw/manager/NetManager"
;
export
default
class
IntroScene
extends
Scene
{
...
...
@@ -22,7 +23,9 @@ export default class IntroScene extends Scene {
}
ontap_lab1
(){
SceneCtrl
.
instance
.
change
(
'MainScene'
);
NetManager
.
ins
.
yyh_join1_index
(
async
(
success
)
=>
{
SceneCtrl
.
instance
.
change
(
'MainScene'
);
});
}
ontap_btn0
(){
...
...
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