Guramidev Posted May 17, 2015 Share Posted May 17, 2015 Hello everyone, I am very new to game development, and even more new to Phaser, so may be i am about to ask something stupid, but i would appreciate helping me with this matter. I am creating a little HTML5 board game, and for now, i have written an AI for the game which servers the purpose of generating random but solvable game. When AI is run it returns specified amount of circles with x/y/radius and value parameters of the circle. Drawing those object with phaser looks something like this: At this stage an active circle should be selected, and to describe the selection i want to animate active circle's radius, which would result in circle getting smaller/bigger during the animation. Code i am using for this is: _this.game.add.tween( _this.phaser.circles[0]).to({ radius: -90 }, 1000, Phaser.Easing.Linear.None, true, 0, 1000, true);But it is not working, when i want to animate x/y properties it is working just fine, but radius just doesn't work._this.phaser.circles[0] is in this case a graphical object, when i log it i can see that it has x/y properties which i guess results in them being animated with the tween, it also has radius property and _diameter property, but i can not animate any of them. Is it not possible to animate radius, or am i doing something wrong in this case? Link to comment Share on other sites More sharing options...
rich Posted May 18, 2015 Share Posted May 18, 2015 How are you displaying the Circles? Yes you can tween a circle radius quite happily, but unless they are re-rendered you wouldn't notice the change. Link to comment Share on other sites More sharing options...
Recommended Posts