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
26ff65cb
Commit
26ff65cb
authored
Oct 22, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
b8eeec7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
17 deletions
+20
-17
Tool.ts
egret/src/something/Tool.ts
+5
-5
aaa.ts
egret/src/something/logic/aaa.ts
+9
-7
PropGuide.ts
egret/src/something/uis/PropGuide.ts
+6
-5
No files found.
egret/src/something/Tool.ts
View file @
26ff65cb
...
...
@@ -13,15 +13,15 @@ export class Tool {
/**
* 格子宽度
*/
public
static
width
=
8
0
;
public
static
width
=
8
1.5
;
/**
* 格子高度
*/
public
static
height
=
8
0
;
public
static
height
=
8
1.5
;
//整体偏移X
public
static
offsetX
=
1
5
;
public
static
offsetX
=
8.2
5
;
//整体偏移Y
public
static
offsetY
=
2
75
;
public
static
offsetY
=
2
60
;
/**
* 圆角半径
*/
...
...
@@ -52,7 +52,7 @@ export class Tool {
* 初始化数据
*/
public
static
init
(
isTwo
:
boolean
=
false
)
{
this
.
offsetX
=
isTwo
?
55
:
1
5
this
.
offsetX
=
isTwo
?
49
:
8.2
5
//都是9*9
//位置信息
var
spaceX
=
this
.
width
,
...
...
egret/src/something/logic/aaa.ts
View file @
26ff65cb
...
...
@@ -14,13 +14,15 @@ export function drawBg(paths: PathData[], lattices?: number[]) {
for
(
var
m
=
0
;
m
<
lattices
.
length
;
m
++
)
{
if
(
lattices
[
m
])
{
var
rc
=
Tool
.
indexToRc
(
m
);
if
((
!
(
rc
[
0
]
%
2
)
&&
!
(
rc
[
1
]
%
2
))
||
(
rc
[
0
]
%
2
&&
rc
[
1
]
%
2
))
{
let
p
=
Tool
.
getPositionByIndex
(
m
);
let
img
=
new
eui
.
Image
(
texture
);
img
.
x
=
p
[
0
]
-
texture
.
textureWidth
/
2
;
img
.
y
=
p
[
1
]
-
texture
.
textureHeight
/
2
;
bg
.
addChild
(
img
)
}
// if ((!(rc[0] % 2) && !(rc[1] % 2)) || (rc[0] % 2 && rc[1] % 2)) {
let
p
=
Tool
.
getPositionByIndex
(
m
);
let
img
=
new
eui
.
Image
(
texture
);
img
.
x
=
p
[
0
]
-
texture
.
textureWidth
/
2
;
img
.
y
=
p
[
1
]
-
texture
.
textureHeight
/
2
;
img
.
width
=
78
;
img
.
height
=
78
;
bg
.
addChild
(
img
)
// }
}
}
bg
.
cacheAsBitmap
=
true
;
...
...
egret/src/something/uis/PropGuide.ts
View file @
26ff65cb
import
PropType
from
"../../PropType"
;
import
{
Tool
}
from
"../Tool"
;
/**
* 道具使用引导,初始化一次,然后用init初始化
...
...
@@ -86,11 +87,11 @@ export class PropGuide extends egret.DisplayObjectContainer {
this
.
bg
.
graphics
.
lineTo
(
750
,
1624
);
this
.
bg
.
graphics
.
lineTo
(
0
,
1624
);
this
.
bg
.
graphics
.
lineTo
(
0
,
0
);
this
.
bg
.
graphics
.
moveTo
(
15
,
275
);
this
.
bg
.
graphics
.
lineTo
(
15
,
990
);
this
.
bg
.
graphics
.
lineTo
(
750
-
15
,
990
);
this
.
bg
.
graphics
.
lineTo
(
750
-
15
,
275
);
this
.
bg
.
graphics
.
lineTo
(
15
,
275
);
this
.
bg
.
graphics
.
moveTo
(
Tool
.
offsetX
,
Tool
.
offsetY
);
this
.
bg
.
graphics
.
lineTo
(
Tool
.
offsetX
,
Tool
.
offsetY
+
Tool
.
height
*
Tool
.
rowNum
);
this
.
bg
.
graphics
.
lineTo
(
750
-
Tool
.
offsetX
,
Tool
.
offsetY
+
Tool
.
height
*
Tool
.
rowNum
);
this
.
bg
.
graphics
.
lineTo
(
750
-
Tool
.
offsetX
,
Tool
.
offsetY
);
this
.
bg
.
graphics
.
lineTo
(
Tool
.
offsetX
,
Tool
.
offsetY
);
this
.
bg
.
graphics
.
endFill
();
}
}
\ No newline at end of file
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