Only thing i want is to pick a random X position and random Y position
Random x = new Random(255); Random y = new Random(255); int xp = x.Next(0, 255); int yp = y.Next(0,255);
Error: CS0236 A field initializer cannot reference the non-static field, method, or property 'Protivnik.x'
Error: CS0236 A field initializer cannot reference the non-static field, method, or property 'Protivnik.y'
Can anyone explain me why is this happening?
Aucun commentaire:
Enregistrer un commentaire