static class ItemsGround
This class represents item ground manager.
Original: ItemsGround
Source code in src/pyg2o/classes/items.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
create(data)
async
staticmethod
This method will create the item ground.
Parameters:
* dict {instance, amount=1, physicsEnabled=false position={x=0,y=0,z=0}, rotation={x=0,y=0,z=0}, world=CONFIG_WORLD, virtualWorld=0}:
* string instance: the scripting instance of game item.
* bool physicsEnabled: the physics state of the item ground.
* dict {x, y, z} position: the position of the item ground in the world.
* dict {x, y, z} rotation: the rotation of the item ground in the world.
* string world: the world the item ground is in (.ZEN file path).
* int virtualWorld: the virtual world id in range <0, 65535>.
Returns int:
the item ground id.
Source code in src/pyg2o/classes/items.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
destroy(id)
async
staticmethod
This method will destroy the item ground by it's unique id.
Parameters:
* int itemGroundId: the item ground unique id.
Source code in src/pyg2o/classes/items.py
49 50 51 52 53 54 55 56 57 58 59 60 | |
getById(id)
async
staticmethod
This method will retrieve the item ground object by its unique id.
Parameters:
* int itemGroundId: the unique item ground id.
Returns ItemGround:
the item ground object or throws an exception if the object cannot be found.
Source code in src/pyg2o/classes/items.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |