I want to spawn a game object every time a public variable is 5 more than the last for example 5,10,15,20.... but how can I do this? I was thinking of making something like
public var i:int;
if(i==5||i==10||i==15...){
//do something
}
but the problem is that this is suppose to go to infinity so how can I?maybe a list? or and array?
↧