Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
80659000
Commit
80659000
authored
Feb 12, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'optimize/route' into 'main'
fix route See merge request
mycard/Neos!105
parents
e17ac6e2
e8a05cc9
Pipeline
#20124
passed with stages
in 6 minutes and 40 seconds
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
12 deletions
+17
-12
src/ui/Duel/fixedSlot.tsx
src/ui/Duel/fixedSlot.tsx
+2
-2
src/ui/Duel/hands.tsx
src/ui/Duel/hands.tsx
+1
-1
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+1
-1
src/ui/Duel/singleSlot.tsx
src/ui/Duel/singleSlot.tsx
+1
-1
src/ui/JoinRoom.tsx
src/ui/JoinRoom.tsx
+1
-1
src/ui/Mora.tsx
src/ui/Mora.tsx
+7
-2
src/ui/Neos.tsx
src/ui/Neos.tsx
+3
-3
src/ui/WaitRoom.tsx
src/ui/WaitRoom.tsx
+1
-1
No files found.
src/ui/Duel/fixedSlot.tsx
View file @
80659000
...
...
@@ -99,11 +99,11 @@ const FixedSlot = (props: {
diffuseTexture=
{
props
.
state
.
occupant
?
faceDown
?
new
BABYLON
.
Texture
(
`assets/card_back.jpg`
)
?
new
BABYLON
.
Texture
(
`
/
assets/card_back.jpg`
)
:
new
BABYLON
.
Texture
(
`https://cdn02.moecube.com:444/images/ygopro-images-zh-CN/${props.state.occupant.id}.jpg`
)
:
new
BABYLON
.
Texture
(
`assets/card_slot.png`
)
:
new
BABYLON
.
Texture
(
`
/
assets/card_slot.png`
)
}
alpha=
{
props
.
state
.
occupant
?
1
:
0
}
></
standardMaterial
>
...
...
src/ui/Duel/hands.tsx
View file @
80659000
...
...
@@ -51,7 +51,7 @@ const Hands = () => {
sequence=
{
idx
}
position=
{
position
}
rotation=
{
handRotation
}
cover=
{
(
_
)
=>
`assets/card_back.jpg`
}
cover=
{
(
_
)
=>
`
/
assets/card_back.jpg`
}
/>
);
})
}
...
...
src/ui/Duel/main.tsx
View file @
80659000
...
...
@@ -94,7 +94,7 @@ const Light = () => (
const
Ground
=
()
=>
{
const
shape
=
CONFIG
.
GroundShape
();
const
texture
=
new
BABYLON
.
Texture
(
`assets/newfield.png`
);
const
texture
=
new
BABYLON
.
Texture
(
`
/
assets/newfield.png`
);
texture
.
hasAlpha
=
true
;
return
(
...
...
src/ui/Duel/singleSlot.tsx
View file @
80659000
...
...
@@ -77,7 +77,7 @@ const SingleSlot = (props: {
>
<standardMaterial
name="single-slot-mat"
diffuseTexture={new BABYLON.Texture(`
assets
/
card_back
.
jpg
`)}
diffuseTexture={new BABYLON.Texture(`
/
assets
/
card_back
.
jpg
`)}
alpha={props.state.length == 0 ? 0 : 1}
/>
</box>
...
...
src/ui/JoinRoom.tsx
View file @
80659000
...
...
@@ -32,7 +32,7 @@ export default function JoinRoom() {
<
div
id=
"login"
>
<
form
className=
"login-form"
onSubmit=
{
()
=>
navigate
(
`/${player}/${passWd}/${ip}`
)
}
onSubmit=
{
()
=>
navigate
(
`/
room/
${player}/${passWd}/${ip}`
)
}
>
<
span
className=
"fa fa-user"
></
span
>
<
Input
...
...
src/ui/Mora.tsx
View file @
80659000
...
...
@@ -10,7 +10,7 @@ import {
import
{
selectDuelHsStart
}
from
"
../reducers/duel/mod
"
;
import
{
store
}
from
"
../store
"
;
import
{
useEffect
}
from
"
react
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
useNavigate
,
useParams
}
from
"
react-router-dom
"
;
import
{
Button
,
Modal
}
from
"
antd
"
;
import
{
ScissorOutlined
,
...
...
@@ -24,11 +24,16 @@ const Mora = () => {
const
selectTpAble
=
useAppSelector
(
selectTpSelectAble
);
const
duelHsStart
=
useAppSelector
(
selectDuelHsStart
);
const
navigate
=
useNavigate
();
const
{
player
,
passWd
,
ip
}
=
useParams
<
{
player
?:
string
;
passWd
?:
string
;
ip
?:
string
;
}
>
();
useEffect
(()
=>
{
// 若对局已经开始,自动跳转
if
(
duelHsStart
)
{
navigate
(
"
/duel
"
);
navigate
(
`/duel/
${
player
}
/
${
passWd
}
/
${
ip
}
`
);
}
},
[
duelHsStart
]);
...
...
src/ui/Neos.tsx
View file @
80659000
...
...
@@ -10,9 +10,9 @@ export default function () {
return
(
<
Routes
>
<
Route
path=
"/"
element=
{
<
JoinRoom
/>
}
/>
<
Route
path=
"/:player/:passWd/:ip"
element=
{
<
WaitRoomV2
/>
}
/>
<
Route
path=
"/mora"
element=
{
<
MoraV2
/>
}
/>
<
Route
path=
"/duel"
element=
{
<
NeosDuel
/>
}
/>
<
Route
path=
"/
room/
:player/:passWd/:ip"
element=
{
<
WaitRoomV2
/>
}
/>
<
Route
path=
"/mora
/:player/:passWd/:ip
"
element=
{
<
MoraV2
/>
}
/>
<
Route
path=
"/duel
/:player/:passWd/:ip
"
element=
{
<
NeosDuel
/>
}
/>
</
Routes
>
);
}
src/ui/WaitRoom.tsx
View file @
80659000
...
...
@@ -191,7 +191,7 @@ const WaitRoom = () => {
player0
.
state
!==
READY_STATE
||
player1
.
state
!==
READY_STATE
?
{}
:
{
pathname
:
`/mora`
}
:
{
pathname
:
`/mora
/${player}/${passWd}/${ip}
`
}
}
>
开始游戏
...
...
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