Home > Net >  Map. Cs (102, 30) : [CS0117] '" Random "does not contain the definition of" Rang
Map. Cs (102, 30) : [CS0117] '" Random "does not contain the definition of" Rang

Time:11-15

Int the x1=Random. Range [9, 10];
Vector3 createPosition=new Vector3 (x1, the Random Range (7, 8), 0).


CodePudding user response:

refer to the building S?? 's? t? o? c? t? F response:
int x1=Random. Range [9, 10].
Vector3 createPosition=new Vector3 (x1, the Random Range (7, 8), 0).



Are you sure is [] rather than (), a method call to use ()

CodePudding user response:

The Random rm=new Random ();
Int the x1=rm. Next (9, 10);
  •  Tags:  
  • C#
  • Related