public FaceInfo Randomise(Simple2x2 pos, Simple2x2 rot, Simple2x2 sc) { RandomIndex(); FaceInfo final = new FaceInfo(Index, Colour); Vector3 p = new Vector3(pos.RandX(), 0.0F, pos.RandY()); final._Position = p; Vector3 r = new Vector3(0.0F, 0.0F, rot.RandX()); final._Rotation = r; Vector2 s = Utility.RandomMatrixPoint(sc); final._Scale = Vector3.one + new Vector3(s.x, s.y, 0.0F); return(final); }
public FaceInfo Randomise(bool gender, Simple2x2 pos, Simple2x2 rot, Simple2x2 sc) { int Index = gender ? Random.Range(0, Male.Length) : Random.Range(0, Female.Length); FaceInfo final = new FaceInfo(Index, Colour); final.Obj = gender ? Male[Index]: Female[Index]; Vector3 p = new Vector3(pos.RandX(), 0.0F, pos.RandY()); final._Position = p; Vector3 r = new Vector3(0.0F, 0.0F, rot.RandX()); final._Rotation = r; Vector2 s = Utility.RandomMatrixPoint(sc); final._Scale = Vector3.one + new Vector3(s.x, s.y, 0.0F); return(final); }