add ball on screen
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a6cceb31ea
commit
eb0f270f03
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1,13 @@
|
||||
import React from "react";
|
||||
|
||||
import "../../style/ball.css";
|
||||
|
||||
import Ball from "../../assets/icon/ball.svg";
|
||||
|
||||
export function BallPiece() {
|
||||
return (
|
||||
<div className={`ball-div`}>
|
||||
<Ball id={'ball'}/>
|
||||
</div>
|
||||
)
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
export interface Ball {
|
||||
|
||||
position: string,
|
||||
|
||||
/**
|
||||
* Percentage of the player's position to the bottom (0 means top, 1 means bottom, 0.5 means middle)
|
||||
*/
|
||||
bottom_percentage: number,
|
||||
|
||||
/**
|
||||
* Percentage of the player's position to the right (0 means left, 1 means right, 0.5 means middle)
|
||||
*/
|
||||
right_percentage: number,
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
#ball * {
|
||||
fill: #c5520d;
|
||||
}
|
||||
|
||||
#ball {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
Loading…
Reference in new issue