def makePiece(pos, vx, vy, model, parent : example.Wrap1): a = Sprite(model = model, pos = pos) id = parent.add(a) s = Script() s.addAction (act.MoveAccelerated (id = id, v0 = [vx, vy], a = [0, 0.5*vars.gravity], yStop=0)) s.addAction (act.RemoveEntity (id = id)) # type = action.remove_object, args = { id = id1} example.play(s)
def make_piece(pos, vx, vy, model, parent: example.Wrap1): a = entity.Sprite(model=model, pos=pos) id = parent.add(a) s = Script() s.add_action( act.MoveAccelerated(entity_id=id, v0=[vx, vy], a=[0, 0.5 * vars.gravity], yStop=0)) s.add_action(act.RemoveEntity(entity_id=id)) example.play(s)