Javascript pushing objects into array changes entire array

前端 未结 8 2357
借酒劲吻你
借酒劲吻你 2020-12-03 08:48

I\'m using a specific game making framework but I think the question applies to javascript

I was trying to make a narration script so the player can see \"The orc hi

8条回答
  •  情话喂你
    2020-12-03 09:07

    servermessagelist: new Array() empties the array every time it's executed. Only execute that code once when you originally initialize the array.

提交回复
热议问题