mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 18:24:12 +02:00
building progress
This commit is contained in:
parent
066cf9287f
commit
812f3cdd0e
2 changed files with 9 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import {BuildingState, WorldBoundaries, BuildingType, Team} from "../Data/Parser";
|
||||
import {BuildingState, WorldBoundaries, BuildingType, Team, MedicState} from "../Data/Parser";
|
||||
import {Show} from "solid-js";
|
||||
|
||||
export interface BuildingProp {
|
||||
|
|
@ -55,8 +55,10 @@ export function Building(props: BuildingProp) {
|
|||
try {
|
||||
const image = () => getBuildingType(props.building.buildingType);
|
||||
return <g transform={transform()}>
|
||||
<circle r={16} stroke-width={1} stroke="white" fill={teamColor()}
|
||||
opacity={alpha()}/>
|
||||
<circle r={16} stroke-width={1.5} stroke="white" fill={teamColor()}
|
||||
opacity={alpha()}
|
||||
stroke-dasharray={`${props.building.buildProgress} 100`}
|
||||
/>
|
||||
<image href={image()} class="player-icon" height={32} width={32} transform={`translate(-16 -16)`}
|
||||
opacity={imageOpacity()}/>
|
||||
<Show when={props.building.angle}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue