careerszoqa.blogg.se

How to create your own game spin
How to create your own game spin











then will rotate by a random number from 0 to 360 degrees. the wheel will spin round from 2 to 4 times. waiting for your input, then calling "spin" function the game has just started = we can spin the wheel setting text field registration point in its center Var dot = wheel.addChild(dots.create(x, y, "dot")) Y = Math.sin(i / slices * Math.PI * 2) * 225 Var x = s(i / slices * Math.PI * 2) * 225, Wheel = (game.width / 2, game.width / 2, "wheel") Īrrow = (game.width / 2.5, 70, 'arrow') ĭots.physicsBodyType = funtion to be executed when the state is created function to be executed once the state preloads

how to create your own game spin

Game = new Phaser.Game(600, 600, Phaser.AUTO, "")

how to create your own game spin how to create your own game spin

prize names, starting from 12 o'clock going clockwise number of slices (prizes) placed in the wheel













How to create your own game spin