Я хочу сделать планку, которая показывает такую переменную, как время регенерации пули. И я знаю, что для этого мне нужно изменить параметр масштаба, предоставленный объектам. Есть мой код: < /p>
if mermiat == False and mertim >= 0.5:
mermiat = True
mertim = 0
elif mermiat == True and mertim >= 0.5:
mertim = 0
if mermiat == True:
BulletBar.scale_x = 12
if mermiat == False:
BulletBar.scale_x = mertim * 24
Player = Karakter()
BulletBar = Entity(model = "quad", position = (-13,-9,-2),scale=(12,0.5,1), color="FFFF00")
"""
Notes:
mermiat: bool variable to shotting bullets. If it is True, Player can shot Bullets.
mertim: timer for shotting bullets. It blocks spawning bullets.
Karakter(): Player class
in the player class(Karakter) mertim is updating.
If blocks is in the Player class(Karakter), at the update function.
"""
< /code>
Я новичок в кодировании Python. Это будет простой проблемой. Я извиняюсь за то, что потратил ваше время. Спасибо вам заранее тем, кто читает и помогает.
Подробнее здесь: https://stackoverflow.com/questions/796 ... ina-engine
Как я могу создать планку регенерации пули в двигателе Python/Ursina? ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение