protected override void Start() { base.Start(); this.debugMode = true; ModelPoint mp1 = new ModelPoint(0.175f, 50.0f); ModelPoint mp2 = new ModelPoint(0.47f, 10.0f); ModelPointList pointList = new ModelPointList(200.0f, 0.7f, new ModelPoint[] { mp1, mp2 }); _dashDropoffModel = new MagnitudeDropoffModel(pointList); }
public void TestLineCreation() { ModelPoint p1 = new ModelPoint(0.15f, 80f); ModelPoint p2 = new ModelPoint(0.4f, 60f); ModelPointList list = new ModelPointList(initialStrength: 100.0f, lifetime: 1.0f); list.Add(p1); list.Add(p2); MagnitudeDropoffModel model = new MagnitudeDropoffModel(list); Debug.Log(model.ToString()); }
public ForceRunner(MagnitudeDropoffModel model, Vector2 dir) : this(new CustomForce(model, dir)) { }
public CustomForce(MagnitudeDropoffModel model, Vector2 dir) { _dropoffModel = model; _direction = dir.normalized; }