cb-hackers / cbEnchanted

A new runtime for CoolBasic
13 stars 3 forks source link

ResetObjectCollision ei tyhjennä objektin törmäyslistaa #70

Closed valscion closed 12 years ago

valscion commented 12 years ago
FrameLimit 60
obj = LoadObject("Media\guy.bmp", 72)
obj2 = CloneObject(obj)

PositionObject obj2, 0, -50
SetupCollision obj, obj2, 2, 2, 2

Repeat
    TurnObject obj, (LeftKey() - RightKey()) *  5
    MoveObject obj, (UpKey() - DownKey()) * 3

    If KeyDown(cbKeySpace) Then
        ResetObjectCollision obj
        count = count + CountCollisions(obj)
    EndIf

    Text 0, 0, count

    DrawScreen
Forever

Ruudulla oleva numero pitäisi aina olla 0.