Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
East_L215
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
East_L215
Commits
c22de964
Commit
c22de964
authored
Apr 10, 2020
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev commit
parent
5f1054f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
19 deletions
+1
-19
play.component.ts
src/app/play/play.component.ts
+1
-19
No files found.
src/app/play/play.component.ts
View file @
c22de964
...
@@ -108,14 +108,10 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -108,14 +108,10 @@ export class PlayComponent implements OnInit, OnDestroy {
m_runStatus
=
false
;
m_runStatus
=
false
;
m_mouseInRunway
=
false
;
m_mouseInRunway
=
false
;
m_leftBuffer
=
[]
m_rightBuffer
=
[]
m_rightBuffer
=
[]
m_lineIndex
=
0
;
m_requestAfterCard
=
false
;
m_requestAfterCard
=
false
;
m_requestID
=
null
;
m_requestID
=
null
;
m_enableRunway
=
false
;
m_enableRunway
=
false
;
m_lastCard_x
=
null
;
m_lastCard_id
=
null
;
// ------------------------------------
// ------------------------------------
...
@@ -188,14 +184,10 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -188,14 +184,10 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
m_allCardIds
=
[]
this
.
m_allCardIds
=
[]
this
.
cardRunControl
(
false
)
this
.
cardRunControl
(
false
)
this
.
m_leftBuffer
=
[]
this
.
m_rightBuffer
=
[]
this
.
m_rightBuffer
=
[]
this
.
m_lineIndex
=
0
;
this
.
m_requestAfterCard
=
false
;
this
.
m_requestAfterCard
=
false
;
this
.
m_requestID
=
null
;
this
.
m_requestID
=
null
;
this
.
m_enableRunway
=
false
;
this
.
m_enableRunway
=
false
;
this
.
m_lastCard_x
=
null
;
this
.
m_lastCard_id
=
null
;
}
}
endGame
(){
endGame
(){
...
@@ -288,9 +280,6 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -288,9 +280,6 @@ export class PlayComponent implements OnInit, OnDestroy {
let
cardNumber
=
Math
.
ceil
(
this
.
g_canvasWidth
/
cardWidth
);
let
cardNumber
=
Math
.
ceil
(
this
.
g_canvasWidth
/
cardWidth
);
for
(
let
index
=
0
;
index
<
6
;
index
++
){
for
(
let
index
=
0
;
index
<
6
;
index
++
){
let
newCard
=
this
.
createCard
(
index
,
index
*
cardWidth
,
boundingBox
.
y
);
let
newCard
=
this
.
createCard
(
index
,
index
*
cardWidth
,
boundingBox
.
y
);
if
(
index
+
1
==
cardNumber
){
this
.
m_lastCard_x
=
index
*
cardWidth
}
if
(
index
>=
cardNumber
){
if
(
index
>=
cardNumber
){
newCard
.
ref
.
x
=
-
999
newCard
.
ref
.
x
=
-
999
newCard
.
waiting
=
true
;
newCard
.
waiting
=
true
;
...
@@ -316,7 +305,6 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -316,7 +305,6 @@ export class PlayComponent implements OnInit, OnDestroy {
y
:
y
+
150
*
this
.
g_mapScale
y
:
y
+
150
*
this
.
g_mapScale
}
}
})
})
element
.
lineIndex
=
this
.
m_lineIndex
++
;
let
imageContainer
=
new
MySprite
()
let
imageContainer
=
new
MySprite
()
imageContainer
.
init
(
this
.
g_cartoon
.
images
.
get
(
"
card
"
))
imageContainer
.
init
(
this
.
g_cartoon
.
images
.
get
(
"
card
"
))
...
@@ -384,8 +372,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -384,8 +372,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let
width
=
230
*
this
.
g_mapScale
;
let
width
=
230
*
this
.
g_mapScale
;
if
(
(
x
+
width
*
0.5
)
<
this
.
g_canvasWidth
&&
(
(
x
+
width
*
0.5
)
>
this
.
g_canvasWidth
-
21
*
this
.
g_mapScale
)
&&
!
this
.
m_requestAfterCard
){
if
(
(
x
+
width
*
0.5
)
<
this
.
g_canvasWidth
&&
(
(
x
+
width
*
0.5
)
>
this
.
g_canvasWidth
-
21
*
this
.
g_mapScale
)
&&
!
this
.
m_requestAfterCard
){
this
.
m_requestAfterCard
=
true
;
this
.
m_requestAfterCard
=
true
;
console
.
log
(
"
Request: id=
"
+
id
)
this
.
m_requestID
=
id
this
.
m_requestID
=
id
// + 115*this.g_mapScale;
}
}
if
(
this
.
m_rightBuffer
[
0
]
&&
this
.
m_requestAfterCard
){
if
(
this
.
m_rightBuffer
[
0
]
&&
this
.
m_requestAfterCard
){
...
@@ -398,16 +385,11 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -398,16 +385,11 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
if
(
x
<
-
0.5
*
width
&&
!
this
.
g_cartoon
.
getCartoonElement
(
id
).
waiting
){
if
(
x
<
-
0.5
*
width
&&
!
this
.
g_cartoon
.
getCartoonElement
(
id
).
waiting
){
console
.
log
(
"
回收:
"
+
id
)
this
.
g_cartoon
.
getCartoonElement
(
id
).
waiting
=
true
;
this
.
g_cartoon
.
getCartoonElement
(
id
).
waiting
=
true
;
this
.
m_rightBuffer
.
push
(
id
)
this
.
m_rightBuffer
.
push
(
id
)
}
}
}
}
duplicateCard
(){
}
...
...
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