Trusiaczek Posted March 15, 2018 Share Posted March 15, 2018 Hello, I'd like to know, how i might to set inputEnableChildren flag to false - make it work? i read on the internet, that the "inputEnableChildren" method must be validate before we used to "add" method, but there is no another way to change this flag on false after this? Or Is any alternative easiest way to dynamic disable click mouse event? var sourceState = { create: function() { game.physics.startSystem(Phaser.Physics.P2JS); this.reactContainer = game.add.group(); sourceState.reactContainer.inputEnableChildren = true; for(let i =0; i<9; i++) this.rect = this.reactContainer.create(i*20, i*30, 'rect_normal'); this.reactContainer.onChildInputDown.add(sourceState.fill, this); }, update: function() { }, fill: function(rect) { if(sourceState.playerMoves >= 2) { sourceState.reactContainer.inputEnableChildren = false; console.log("heo"); } sourceState.playerMoves++; rect.tint = 0x68B67F; }, Link to comment Share on other sites More sharing options...
samme Posted March 15, 2018 Share Posted March 15, 2018 group.setAll('input.enabled', false); Link to comment Share on other sites More sharing options...
Recommended Posts