private void CreateMineralsSprtBuild(MineralType mineralType, Vector3D position) { Mineral mineral = new Mineral(); mineral.MineralType = mineralType; mineral.InitialVelocity = Math3D.GetRandomVector_Circular(8); mineral.CreateMineral(_materialManager, _map, _sharedVisuals, position, true, .0005); mineral.PhysicsBody.ApplyForce += new BodyForceEventHandler(Body_ApplyForce); }
private void CreateMinerals_LINE() { List <MineralType> mineralTypes = new List <MineralType>(); mineralTypes.AddRange((MineralType[])Enum.GetValues(typeof(MineralType))); mineralTypes.Remove(MineralType.Custom); double x = -15; foreach (MineralType mineralType in mineralTypes) { Mineral mineral = new Mineral(); mineral.MineralType = mineralType; mineral.InitialVelocity = Math3D.GetRandomVector_Circular(.25); mineral.CreateMineral(_materialManager, _map, _sharedVisuals, new Vector3D(x, 10, 0), true, .0005); mineral.PhysicsBody.ApplyForce += new BodyForceEventHandler(Body_ApplyForce); x += 2; } }
private void CreateMinerals_LINE() { List<MineralType> mineralTypes = new List<MineralType>(); mineralTypes.AddRange((MineralType[])Enum.GetValues(typeof(MineralType))); mineralTypes.Remove(MineralType.Custom); double x = -15; foreach (MineralType mineralType in mineralTypes) { Mineral mineral = new Mineral(); mineral.MineralType = mineralType; mineral.InitialVelocity = Math3D.GetRandomVector_Circular(.25); mineral.CreateMineral(_materialManager, _map, _sharedVisuals, new Vector3D(x, 10, 0), true, .0005); mineral.PhysicsBody.ApplyForce += new BodyForceEventHandler(Body_ApplyForce); x += 2; } }