Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by tangxuanli

I have 10 entities named "enemy"
also I have the variable "score" in main.game:
score:0,

when "enemy" was killed ,I want to add 100 to score.

because score is the variable of "main.game".
when "enemy" was kill,the check() function is in the "bullet" entity.

how the entities can modify the "score"?
Please help me on this stupid question...thanks...

1 decade ago by StuartTresadern

ig.game.score += 100;

1 decade ago by tangxuanli

thank you very much~~~it's working.
Page 1 of 1
« first « previous next › last »