Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yyh
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
yyh
Commits
07c5bd8b
Commit
07c5bd8b
authored
Dec 12, 2019
by
wangzhujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1232
parent
468d3ea0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
14 deletions
+25
-14
PKSkin.exml
egret/resource/skins/PKSkin.exml
+1
-1
PlaceSkin.exml
egret/resource/skins/PlaceSkin.exml
+2
-2
Main.ts
egret/src/Main.ts
+4
-0
GuidePanel.ts
egret/src/yazuwei/GuidePanel.ts
+8
-7
PKScene.ts
egret/src/yazuwei/PKScene.ts
+10
-4
No files found.
egret/resource/skins/PKSkin.exml
View file @
07c5bd8b
...
...
@@ -2,7 +2,7 @@
<e:Skin
class=
"PKSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
width=
"750"
height=
"1624"
x=
"0"
y=
"0"
source=
"pkBG_jpg"
/>
<e:Image
id=
"myline"
width=
"212"
height=
"941"
scale9Grid=
"26,139,160,144"
bottom=
"0"
horizontalCenter=
"-157"
anchorOffsetY=
"0"
source=
"pkmyline2_png"
/>
<e:Image
id=
"otherline"
width=
"212"
height=
"9
41"
scale9Grid=
"26,103,159,429"
bottom=
"0"
horizontalCenter=
"157"
source=
"pkotherline2_png
"
/>
<e:Image
id=
"otherline"
width=
"212"
height=
"9
00"
scale9Grid=
"26,103,159,429"
bottom=
"0"
horizontalCenter=
"157"
source=
"pkotherline2_png"
anchorOffsetY=
"0
"
/>
<e:Label
id=
"myteam"
text=
"我方队伍"
x=
"112"
y=
"613"
size=
"29"
textAlign=
"center"
verticalAlign=
"middle"
textColor=
"0xfcffff"
width=
"212"
/>
<e:Label
id=
"myteamnum"
text=
"总步数:9999"
x=
"112"
y=
"648"
size=
"30"
verticalAlign=
"middle"
textColor=
"0xfe0f5a"
width=
"212"
textAlign=
"center"
/>
<e:Label
id=
"otherteam"
text=
"PK方队伍"
x=
"426"
y=
"738"
size=
"29"
textAlign=
"center"
verticalAlign=
"middle"
textColor=
"0xFCFFFF"
width=
"212"
/>
...
...
egret/resource/skins/PlaceSkin.exml
View file @
07c5bd8b
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"PlaceSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Group
width=
"714"
height=
"11
81"
horizontalCenter=
"15"
verticalCenter=
"1
9.5"
anchorOffsetY=
"0"
>
<e:Group
width=
"714"
height=
"11
23"
horizontalCenter=
"15"
verticalCenter=
"-
9.5"
anchorOffsetY=
"0"
>
<e:Image
id=
"mapBG"
width=
"683"
height=
"801"
x=
"0"
y=
"111"
source=
"maphz_png"
scaleX=
"1"
scaleY=
"1"
/>
<e:Image
width=
"308"
height=
"166"
x=
"406"
y=
"81"
source=
"mappass_png"
scaleX=
"1"
scaleY=
"1"
/>
<e:Button
id=
"closeBtn"
label=
"Button"
skinName=
"ui.IconButtonSkin"
icon=
"closeBtn_png"
scaleX=
"1"
scaleY=
"1"
width=
"48"
height=
"48"
anchorOffsetX=
"24"
anchorOffsetY=
"24"
x=
"658"
y=
"24"
/>
<e:Button
id=
"knowBtn"
label=
"Button"
skinName=
"ui.IconButtonSkin"
icon=
"mapBtn_png"
scaleX=
"1"
scaleY=
"1"
width=
"449"
height=
"122"
anchorOffsetX=
"224.5"
anchorOffsetY=
"61"
x=
"340.5"
y=
"1015"
/>
<e:Label
id=
"sharelab"
text=
"首次分享可获得10能量"
size=
"28"
textAlign=
"center"
width=
"750"
scaleX=
"1"
scaleY=
"1"
y=
"1
126
"
x=
"-33"
/>
<e:Label
id=
"sharelab"
text=
"首次分享可获得10能量"
size=
"28"
textAlign=
"center"
width=
"750"
scaleX=
"1"
scaleY=
"1"
y=
"1
092
"
x=
"-33"
/>
</e:Group>
...
...
egret/src/Main.ts
View file @
07c5bd8b
...
...
@@ -49,6 +49,7 @@ import TransScene from './yazuwei/TransScene';
import
FinishPanel
from
'./yazuwei/FinishPanel'
;
import
{
loadSvgaRes
}
from
'./loadSvga'
;
import
{
getResPath
}
from
'./utils'
;
import
{
GCache
}
from
'../libs/tc/util/GCache'
;
class
Main
extends
MainBase
{
protected
registerModules
()
{
...
...
@@ -253,6 +254,9 @@ class Main extends MainBase {
}
Waiting
.
instance
.
hide
();
let
data
=
DataManager
.
ins
.
getData
(
"homeBaseInfo"
).
data
;
if
(
data
.
currentLevel
==
8
){
GCache
.
writeCache
(
"finishtzw"
,
true
);
}
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
data
);
},
window
[
'projectId'
])
...
...
egret/src/yazuwei/GuidePanel.ts
View file @
07c5bd8b
...
...
@@ -4,6 +4,7 @@ import Panel from "../views/Panel";
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
{
GCache
}
from
"../../libs/tc/util/GCache"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
StartScene
from
"../startScene/StartScene"
;
export
default
class
GuidePanel
extends
Panel
{
...
...
@@ -52,9 +53,9 @@ export default class GuidePanel extends Panel{
this
.
hand
.
touchEnabled
=
true
;
let
now
=
new
Date
();
if
(
now
.
getTime
()
>
window
[
'PKstarttime'
]){
this
.
onTap
(
this
.
unlockBtn
,
this
.
initGuide2
);
this
.
onTap
(
this
,
this
.
initGuide2
);
}
else
{
this
.
onTap
(
this
.
unlockBtn
,
this
.
initGuide3
);
this
.
onTap
(
this
,
this
.
initGuide3
);
}
}
...
...
@@ -66,7 +67,7 @@ export default class GuidePanel extends Panel{
this
.
dianran
.
visible
=
false
;
this
.
onTap
(
this
.
pkBtn
,
this
.
initGuide3
);
this
.
onTap
(
this
,
this
.
initGuide3
);
}
...
...
@@ -76,7 +77,7 @@ export default class GuidePanel extends Panel{
this
.
guide3
.
visible
=
true
;
this
.
xuanshi
.
visible
=
false
;
this
.
dianran
.
visible
=
false
;
this
.
onTap
(
this
.
firedBtn
,
this
.
initXuanshi
);
this
.
onTap
(
this
,
this
.
initXuanshi
);
}
initXuanshi
(){
...
...
@@ -90,8 +91,8 @@ export default class GuidePanel extends Panel{
// this.onTap(this.closeBtn,()=>{this.hidePanel()});
// this.onTap(this.fireBtn,()=>{this.hidePanel()});
// }else{
this
.
onTap
(
this
.
closeBtn
,
this
.
backStartScene
);
this
.
onTap
(
this
.
fireBtn
,
this
.
backStartScene
);
this
.
onTap
(
this
,
this
.
backStartScene
);
this
.
onTap
(
this
,
this
.
backStartScene
);
// }
}
...
...
@@ -102,7 +103,7 @@ export default class GuidePanel extends Panel{
this
.
xuanshi
.
visible
=
false
;
this
.
dianran
.
visible
=
true
;
this
.
numlab
.
text
=
"第"
+
data
.
startdata
+
"位线上火炬手"
this
.
onTap
(
this
.
dianran
,
this
.
goPlace
);
this
.
onTap
(
this
,
this
.
goPlace
);
}
backStartScene
(){
let
data
=
{
data
:
DataManager
.
ins
.
getData
(
"homeBaseInfo"
).
data
,
type
:
1
};
...
...
egret/src/yazuwei/PKScene.ts
View file @
07c5bd8b
...
...
@@ -63,17 +63,23 @@ export default class PKScene extends Scene{
let
point
:
egret
.
Point
=
this
.
team1
.
localToGlobal
(
this
.
team1
.
x
,
this
.
team1
.
y
)
if
(
data
.
myTeamSteps
<
50000
){
this
.
myline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
30
7
+
data
.
myTeamSteps
*
0.0096
this
.
myline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
30
0
+
data
.
myTeamSteps
*
0.0075
}
else
{
this
.
myline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
30
7
+
480
+
(
data
.
myTeamSteps
-
50000
)
*
0.009
this
.
myline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
30
0
+
375
+
(
data
.
myTeamSteps
-
50000
)
*
0.0065
}
if
(
data
.
enemyTeamSteps
<
50000
){
this
.
otherline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
30
7
+
data
.
enemyTeamSteps
*
0.0096
this
.
otherline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
30
0
+
data
.
enemyTeamSteps
*
0.0075
}
else
{
this
.
otherline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
307
+
480
+
(
data
.
enemyTeamSteps
-
50000
)
*
0.009
this
.
otherline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
300
+
375
+
(
data
.
enemyTeamSteps
-
50000
)
*
0.0065
}
if
(
data
.
myTeamSteps
>
70000
){
this
.
myline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
300
+
505
}
if
(
data
.
enemyTeamSteps
>
70000
){
this
.
otherline
.
height
=
GameConst
.
stage
.
stageHeight
/
2
-
300
+
505
}
this
.
myline
.
anchorOffsetY
=
this
.
myline
.
height
this
.
otherline
.
anchorOffsetY
=
this
.
otherline
.
height
...
...
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