Сообщение от Clip
L-ee-X, хотелось бы узнать... А возможно ли подключать этот код через include ? Просто говорили что можно делать dll, а я хз как
|
Include "HP.bb"
Graphics3D 640,480,16,2
Repeat
Cls
HP_UP(2)
HP_DOWN(3)
RenderWorld
UpdateWorld
Update_HP()
Flip
Until KeyHit(1)
End
Файл HP.bb
Global size_y%=32
Global size_x%=240
Global ind_size_x%=(240-2)
Global ind_size_y%=32-2
Global Blue% = 255
Global Red%
Function HP_DOWN(key%)
If KeyDown(key%)
ind_size_x% = ind_size_x% -1
Red% = Red% +1
Blue% = Blue% - 1
EndIf
End Function
Function HP_UP(key%)
If KeyDown(key%)
ind_size_x% = ind_size_x% +1
Red% = Red% - 1
Blue% = Blue% + 1
EndIf
End Function
Function Update_HP()
If ind_size_x% > 238 Then ind_size_x% = 238
If ind_size_x% < 0 Then ind_size_x% = 0
If Red% > 255 Then Red% = 255
If Red% < 0 Then Red% = 0
If Blue% > 255 Then Blue% = 255
If Blue% < 0 Then Blue% = 0
Color 255,255,255
Rect 10,10,size_x,size_y,0
Color Red% + 0,Green% + 0,Blue%
Rect 11,11,ind_size_x,ind_size_y
End Function
Вот.
Условия при которых будут отниматься жизни и прибавляться можешь сам писать...
Я просто так на примере клавиш написал...