Marc Posted March 3, 2015 Share Posted March 3, 2015 Dear this a newbie question.I try to use the group filter but i cannot be able to do that successfully.Could you giving me some advice to do that and also could you giving me some info about the "callback" function and how it works, also how to pass parameter to it ? Kind Regards Marc See this exemple : this.unitGroup.filter(function(unit,game) { if (unit.selected == true && unit.name == 'settler' ){ game.buildCityButton.visible = true; } else { game.buildCityButton.visible = false; } }, this); Link to comment Share on other sites More sharing options...
Marc Posted March 11, 2015 Author Share Posted March 11, 2015 Ok tha's work. Really simple.Marc Link to comment Share on other sites More sharing options...
Recommended Posts