кровавые кролики жирнее
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import type { GameStore } from '../game/GameStore';
|
||||
import type { RabbitState } from '../game/types';
|
||||
import { RABBIT_MAX_HP } from '../game/rabbits';
|
||||
import { RABBIT_NIGHT_SPRITE, RABBIT_SPRITE } from '../game/sprites';
|
||||
import HealthBar from './HealthBar';
|
||||
import PixelSprite from './PixelSprite';
|
||||
@@ -24,8 +23,8 @@ const RabbitEntity = observer(function RabbitEntity({ rabbit, store }: { rabbit:
|
||||
>
|
||||
<PixelSprite pixels={store.isNight ? RABBIT_NIGHT_SPRITE : RABBIT_SPRITE} size={size} />
|
||||
</div>
|
||||
{rabbit.hp < RABBIT_MAX_HP && (
|
||||
<HealthBar x={rabbit.x} y={rabbit.y - rabbit.z - size * 0.5 - 6} ratio={rabbit.hp / RABBIT_MAX_HP} />
|
||||
{rabbit.hp < store.rabbitMaxHp && (
|
||||
<HealthBar x={rabbit.x} y={rabbit.y - rabbit.z - size * 0.5 - 6} ratio={rabbit.hp / store.rabbitMaxHp} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user