addTrapezium(layer, ...objects) -> id , method of controller

Add a new Trapezium on the controller of a player.

name type description
layer int layer of the world (must be >= 0)
properties …Object each with Sprite properties for a Trapezium

the identifier (int) of the sprite

// a new Trapezium with its left bottom corner at 200,300.

UB.controller(playerID).addTrapezium(0,{x:200, y:300, height: 60});

See all methods of the api.