Spawn rope
This commit is contained in:
parent
a2fcdb9d07
commit
2315d2241e
|
@ -5,7 +5,8 @@
|
||||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||||
"GUID:f4c364e1215051e4dbc6c0bc8fb49793",
|
"GUID:f4c364e1215051e4dbc6c0bc8fb49793",
|
||||||
"GUID:ddd4dba7c768b564a879069c52854fc5"
|
"GUID:ddd4dba7c768b564a879069c52854fc5",
|
||||||
|
"GUID:c0e1b40f519e6e84b8f4af9930403ecb"
|
||||||
],
|
],
|
||||||
"includePlatforms": [],
|
"includePlatforms": [],
|
||||||
"excludePlatforms": [],
|
"excludePlatforms": [],
|
||||||
|
|
|
@ -106,6 +106,15 @@ public class RopeSimulator : MonoBehaviour
|
||||||
// Build rope if rope joints specified in inspector
|
// Build rope if rope joints specified in inspector
|
||||||
if (IsInitialized)
|
if (IsInitialized)
|
||||||
BuildRope(start, end);
|
BuildRope(start, end);
|
||||||
|
|
||||||
|
GameManager.OnPlayersReady += PlayersReady;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlayersReady(GameObject[] players)
|
||||||
|
{
|
||||||
|
if (IsInitialized) return;
|
||||||
|
|
||||||
|
BuildRope(players[0].GetComponent<RopeJoint>(), players[1].GetComponent<RopeJoint>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BuildRope(RopeJoint start, RopeJoint end)
|
public void BuildRope(RopeJoint start, RopeJoint end)
|
||||||
|
|
Loading…
Reference in New Issue