Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interactiveGames_Level
Project
Project
Details
Activity
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
xuxing@jiuaoedu.com
interactiveGames_Level
Commits
d87f860d
Commit
d87f860d
authored
Nov 08, 2021
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
写配置表
parent
634ccff1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
FormulaSolitaireCtr.ts
...ndle/games/formulaSolitaire/script/FormulaSolitaireCtr.ts
+25
-1
No files found.
assets/sceneBundle/games/formulaSolitaire/script/FormulaSolitaireCtr.ts
View file @
d87f860d
...
@@ -175,7 +175,6 @@ export class FormulaSolitaireCtr extends Component {
...
@@ -175,7 +175,6 @@ export class FormulaSolitaireCtr extends Component {
let
colorStr
=
this
.
curLinePointArr
[
0
].
target
.
getComponent
(
FormulaSolitaireItem
)
!
.
getColor
();
let
colorStr
=
this
.
curLinePointArr
[
0
].
target
.
getComponent
(
FormulaSolitaireItem
)
!
.
getColor
();
let
oldLine
=
this
.
findLineWithPoint
(
selPoint
);
let
oldLine
=
this
.
findLineWithPoint
(
selPoint
);
if
(
oldLine
==
null
)
{
if
(
oldLine
==
null
)
{
console
.
log
(
`没有占有此点的线段`
);
this
.
curLinePointArr
.
push
(
selPoint
);
this
.
curLinePointArr
.
push
(
selPoint
);
selPoint
.
target
.
getComponent
(
FormulaSolitaireItem
)?.
setColor
(
Color
.
fromHEX
(
new
Color
(),
colorStr
));
selPoint
.
target
.
getComponent
(
FormulaSolitaireItem
)?.
setColor
(
Color
.
fromHEX
(
new
Color
(),
colorStr
));
}
}
...
@@ -230,6 +229,31 @@ export class FormulaSolitaireCtr extends Component {
...
@@ -230,6 +229,31 @@ export class FormulaSolitaireCtr extends Component {
console
.
log
(
this
.
allLinePointArr
);
console
.
log
(
this
.
allLinePointArr
);
}
}
getResult
(
numStrArr
:
string
[]){
let
ret
:
any
[]
=
[];
try
{
let
tempArr
:
string
[]
=
[];
tempArr
=
tempArr
.
concat
(
numStrArr
);
ret
.
push
(
this
.
calculator
(
tempArr
));
}
catch
{
console
.
log
(
`错误的算式1`
);
ret
.
push
(
null
);
}
try
{
let
tempArr
:
string
[]
=
[];
tempArr
=
tempArr
.
concat
(
numStrArr
);
tempArr
=
tempArr
.
reverse
();
ret
.
push
(
this
.
calculator
(
tempArr
));
}
catch
{
console
.
log
(
`错误的算式2`
);
ret
.
push
(
null
);
}
return
ret
;
}
findLineWithPoint
(
point
:
ItemPosIfo
)
{
findLineWithPoint
(
point
:
ItemPosIfo
)
{
for
(
let
i
=
0
;
i
<
this
.
allLinePointArr
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
allLinePointArr
.
length
;
++
i
)
{
for
(
let
j
=
0
;
j
<
this
.
allLinePointArr
[
i
].
length
;
++
j
)
{
for
(
let
j
=
0
;
j
<
this
.
allLinePointArr
[
i
].
length
;
++
j
)
{
...
...
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