C# Random Numbers aren't being “random”

后端 未结 5 1657
情歌与酒
情歌与酒 2020-11-28 15:40

I know that the C# Random class does not make \"true random\" numbers, but I\'m coming up with an issue with this code:

    public void autoAttack(enemy theE         


        
5条回答
  •  孤独总比滥情好
    2020-11-28 16:29

    Instantiate the object random outside the method. ( Random random = new Random(); should be written before the method)

    It is also vital that you understand that random isn't really random.

提交回复
热议问题