This commit is contained in:
BOT Alex 2024-02-27 21:04:35 +01:00
commit 8a4a50bd67
2 changed files with 11 additions and 1 deletions

View File

@ -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": [],

View File

@ -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)