Commit 8add806b authored by Chunchi Che's avatar Chunchi Che

integration

parent dbfba98d
Pipeline #21751 passed with stages
in 13 minutes and 20 seconds
...@@ -5,6 +5,8 @@ import React, { type CSSProperties, MouseEventHandler } from "react"; ...@@ -5,6 +5,8 @@ import React, { type CSSProperties, MouseEventHandler } from "react";
import { useConfig } from "@/config"; import { useConfig } from "@/config";
import { Chain } from "./Chain";
const NeosConfig = useConfig(); const NeosConfig = useConfig();
const ASSETS_BASE = const ASSETS_BASE =
...@@ -27,6 +29,7 @@ export const Card: React.FC<{ ...@@ -27,6 +29,7 @@ export const Card: React.FC<{
highlight?: boolean; highlight?: boolean;
focus?: boolean; focus?: boolean;
fly?: boolean; fly?: boolean;
chainIdx?: number;
transTime?: number; transTime?: number;
onClick?: MouseEventHandler<{}>; onClick?: MouseEventHandler<{}>;
style?: CSSProperties; style?: CSSProperties;
...@@ -42,6 +45,7 @@ export const Card: React.FC<{ ...@@ -42,6 +45,7 @@ export const Card: React.FC<{
highlight = false, highlight = false,
focus = false, focus = false,
fly = false, fly = false,
chainIdx,
transTime = 0.3, transTime = 0.3,
onClick, onClick,
style = {}, style = {},
...@@ -71,5 +75,7 @@ export const Card: React.FC<{ ...@@ -71,5 +75,7 @@ export const Card: React.FC<{
} as any } as any
} }
onClick={onClick} onClick={onClick}
></div> >
{chainIdx ? <Chain chainIdx={chainIdx} /> : <></>}
</div>
); );
...@@ -6,8 +6,8 @@ const CIRCLES_COUNT = 8; ...@@ -6,8 +6,8 @@ const CIRCLES_COUNT = 8;
const EASE = 0.2; const EASE = 0.2;
const R = 60; const R = 60;
export const Chain: React.FC<{ chainIdex: number }> = (props: { export const Chain: React.FC<{ chainIdx: number }> = (props: {
chainIdex: number; chainIdx: number;
}) => ( }) => (
<div <div
className="circles" className="circles"
...@@ -29,7 +29,7 @@ export const Chain: React.FC<{ chainIdex: number }> = (props: { ...@@ -29,7 +29,7 @@ export const Chain: React.FC<{ chainIdex: number }> = (props: {
} }
></div> ></div>
))} ))}
<div className="font">{props.chainIdex}</div> <div className="font">{props.chainIdx}</div>
</div> </div>
); );
......
...@@ -113,6 +113,7 @@ export const Mat = () => { ...@@ -113,6 +113,7 @@ export const Mat = () => {
card.directAttack card.directAttack
} }
opponent={card.opponent} opponent={card.opponent}
chainIdx={card.chainIndex}
onClick={ onClick={
card.location.zone == YgoZone.SZONE || card.location.zone == YgoZone.SZONE ||
card.location.zone == YgoZone.MZONE || card.location.zone == YgoZone.MZONE ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment