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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
love_飞影
Neos
Commits
a1abc554
Commit
a1abc554
authored
Dec 05, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rerange Card
parent
a48d933c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
26 deletions
+29
-26
src/api/cards.ts
src/api/cards.ts
+0
-21
src/reducers/duel/handsSlice.ts
src/reducers/duel/handsSlice.ts
+2
-1
src/reducers/duel/util.ts
src/reducers/duel/util.ts
+24
-1
src/ui/Duel/duel.ts
src/ui/Duel/duel.ts
+1
-1
src/ui/Duel/simpleDuel/hands.ts
src/ui/Duel/simpleDuel/hands.ts
+1
-1
src/ui/Duel/simpleDuel/mod.tsx
src/ui/Duel/simpleDuel/mod.tsx
+1
-1
No files found.
src/api/cards.ts
View file @
a1abc554
...
...
@@ -19,27 +19,6 @@ export interface CardMeta {
};
}
interface
CardTransform
{
position
?:
{
x
:
number
;
y
:
number
;
z
:
number
;
};
rotation
?:
{
x
:
number
;
y
:
number
;
z
:
number
;
};
}
/*
* `Neos`中表示卡牌的通用结构
* */
export
interface
Card
{
meta
:
CardMeta
;
transform
:
CardTransform
;
}
/*
* 返回卡片元数据
*
...
...
src/reducers/duel/handsSlice.ts
View file @
a1abc554
import
{
createAsyncThunk
,
ActionReducerMapBuilder
}
from
"
@reduxjs/toolkit
"
;
import
{
DuelState
}
from
"
./mod
"
;
import
{
RootState
}
from
"
../../store
"
;
import
{
Card
,
fetchCard
,
CardMeta
}
from
"
../../api/cards
"
;
import
{
fetchCard
,
CardMeta
}
from
"
../../api/cards
"
;
import
{
judgeSelf
}
from
"
./util
"
;
import
*
as
UICONFIG
from
"
../../config/ui
"
;
import
{
Card
}
from
"
./util
"
;
export
interface
Hands
{
cards
:
Card
[];
...
...
src/reducers/duel/util.ts
View file @
a1abc554
/*
* 对局内状态更新逻辑的一些共用函数
* 对局内状态更新逻辑的一些共用函数
和数据结构
*
* */
import
{
CardMeta
}
from
"
../../api/cards
"
;
/*
* 通过`player`和`selfType`判断是应该处理自己还是对手
* */
...
...
@@ -21,3 +23,24 @@ export function judgeSelf(
return
false
;
}
}
/*
* `Neos`中表示卡牌的通用结构
* */
export
interface
Card
{
meta
:
CardMeta
;
transform
:
CardTransform
;
}
interface
CardTransform
{
position
?:
{
x
:
number
;
y
:
number
;
z
:
number
;
};
rotation
?:
{
x
:
number
;
y
:
number
;
z
:
number
;
};
}
src/ui/Duel/duel.ts
View file @
a1abc554
...
...
@@ -16,7 +16,7 @@
import
React
from
"
react
"
;
import
type
{
RootState
}
from
"
../../store
"
;
import
{
Card
}
from
"
../../
api/cards
"
;
import
{
Card
}
from
"
../../
reducers/duel/util
"
;
/*
* 通用的决斗界面抽象接口
...
...
src/ui/Duel/simpleDuel/hands.ts
View file @
a1abc554
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
CONFIG
from
"
../../../config/ui
"
;
import
{
Card
}
from
"
../../../
api/cards
"
;
import
{
Card
}
from
"
../../../
reducers/duel/util
"
;
export
default
(
hands
:
Card
[],
scene
:
BABYLON
.
Scene
)
=>
{
const
handShape
=
CONFIG
.
HandShape
();
...
...
src/ui/Duel/simpleDuel/mod.tsx
View file @
a1abc554
...
...
@@ -17,7 +17,7 @@ import renderCemetery from "./cemetery";
import
renderExclusion
from
"
./exclusion
"
;
import
renderField
from
"
./field
"
;
import
*
as
CONFIG
from
"
../../../config/ui
"
;
import
{
Card
}
from
"
../../../
api/cards
"
;
import
{
Card
}
from
"
../../../
reducers/duel/util
"
;
import
{
selectCurrentPlayer
}
from
"
../../../reducers/duel/turnSlice
"
;
import
{
selectCurrentPhase
}
from
"
../../../reducers/duel/phaseSlice
"
;
...
...
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