public static QuickRope2 Create(Vector3 pointA, Vector3 pointB, BasicRopeTypes ropeType) { return(Create(pointA, pointB, null, ropeType)); }
public static QuickRope2 Create(Vector3 pointA, GameObject pointB, List <Vector3> curvePoints, BasicRopeTypes ropeType) { GameObject ob1 = new GameObject("Rope"); ob1.transform.position = pointA; return(Create(ob1, pointB, curvePoints, ropeType)); }
public static QuickRope2 Create(GameObject pointA, GameObject pointB, BasicRopeTypes ropeType) { return(Create(pointA, pointB, null, ropeType)); }
public static QuickRope2 Create(GameObject pointA, GameObject pointB, List <Vector3> curvePoints, BasicRopeTypes ropeType) { QuickRope2 qr = pointA.AddComponent <QuickRope2>(); qr.ropeEnd = pointB; switch (ropeType) { case BasicRopeTypes.NONE: break; case BasicRopeTypes.Line: qr.gameObject.AddComponent <QuickRope2Line>(); break; case BasicRopeTypes.Prefab: qr.gameObject.AddComponent <QuickRope2Prefab>(); break; case BasicRopeTypes.Mesh: qr.gameObject.AddComponent <QuickRope2Mesh>(); break; case BasicRopeTypes.Cloth: qr.gameObject.AddComponent <QuickRope2Cloth>(); break; } qr.ApplyRopeSettings(); return(qr); }
public static QuickRope2 Create(Vector3 pointA, Vector3 pointB, BasicRopeTypes ropeType) { return Create(pointA, pointB, null, ropeType); }
public static QuickRope2 Create(GameObject pointA, GameObject pointB, BasicRopeTypes ropeType) { return Create(pointA, pointB, null, ropeType); }
public static QuickRope2 Create(Vector3 pointA, GameObject pointB, List<Vector3> curvePoints, BasicRopeTypes ropeType) { GameObject ob1 = new GameObject("Rope"); ob1.transform.position = pointA; return Create(ob1, pointB, curvePoints, ropeType); }
public static QuickRope2 Create(GameObject pointA, GameObject pointB, List<Vector3> curvePoints, BasicRopeTypes ropeType) { QuickRope2 qr = pointA.AddComponent<QuickRope2>(); qr.ropeEnd = pointB; switch (ropeType) { case BasicRopeTypes.NONE: break; case BasicRopeTypes.Line: qr.gameObject.AddComponent<QuickRope2Line>(); break; case BasicRopeTypes.Prefab: qr.gameObject.AddComponent<QuickRope2Prefab>(); break; case BasicRopeTypes.Mesh: qr.gameObject.AddComponent<QuickRope2Mesh>(); break; case BasicRopeTypes.Cloth: qr.gameObject.AddComponent<QuickRope2Cloth>(); break; } qr.ApplyRopeSettings(); return qr; }