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";
import { useConfig } from "@/config";
import { Chain } from "./Chain";
const NeosConfig = useConfig();
const ASSETS_BASE =
......@@ -27,6 +29,7 @@ export const Card: React.FC<{
highlight?: boolean;
focus?: boolean;
fly?: boolean;
chainIdx?: number;
transTime?: number;
onClick?: MouseEventHandler<{}>;
style?: CSSProperties;
......@@ -42,6 +45,7 @@ export const Card: React.FC<{
highlight = false,
focus = false,
fly = false,
chainIdx,
transTime = 0.3,
onClick,
style = {},
......@@ -71,5 +75,7 @@ export const Card: React.FC<{
} as any
}
onClick={onClick}
></div>
>
{chainIdx ? <Chain chainIdx={chainIdx} /> : <></>}
</div>
);
......@@ -6,8 +6,8 @@ const CIRCLES_COUNT = 8;
const EASE = 0.2;
const R = 60;
export const Chain: React.FC<{ chainIdex: number }> = (props: {
chainIdex: number;
export const Chain: React.FC<{ chainIdx: number }> = (props: {
chainIdx: number;
}) => (
<div
className="circles"
......@@ -29,7 +29,7 @@ export const Chain: React.FC<{ chainIdex: number }> = (props: {
}
></div>
))}
<div className="font">{props.chainIdex}</div>
<div className="font">{props.chainIdx}</div>
</div>
);
......
......@@ -113,6 +113,7 @@ export const Mat = () => {
card.directAttack
}
opponent={card.opponent}
chainIdx={card.chainIndex}
onClick={
card.location.zone == YgoZone.SZONE ||
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