JavaScript - extremely confused on removing elements from Container

后端 未结 4 1272
伪装坚强ぢ
伪装坚强ぢ 2021-01-25 05:47

I\'m making a 2D, top-down Zelda style web rpg single player in JavaScript.

When the player (purple shirt) walks near a cat, it will \"rescue\" it... which basically rem

4条回答
  •  [愿得一人]
    2021-01-25 06:15

    HY,

    Try for statement like this:

    for(var z = rescuedTotal_Array.length; z >= 0; z-- )
    

    If you noticed I just turned it around. It starts at the and going backwards. It is stupid but, maybe this error is just that :)

    Let me know how it goes!

    Regards

提交回复
热议问题