public void OnPlayerHitObstacle() { if (m_batu) { return; } Debug.Log("chay endgame trong game controller"); obstacles.Reset(); Endgame(); }
private static void Prefix(ObstacleController __instance, ObstacleData obstacleData) { if (!(__instance is MultiplayerConnectedPlayerObstacleController)) { ChromaObjectData chromaData = ChromaObjectDatas[obstacleData]; Color? color = chromaData.Color; if (color.HasValue) { __instance.SetObstacleColor(color.Value); } else { __instance.Reset(); } } }
private static void Prefix(ObstacleController __instance, ObstacleData obstacleData) { if (obstacleData is CustomObstacleData customData) { dynamic dynData = customData.customData; Color?color = ChromaUtils.GetColorFromData(dynData); if (color.HasValue) { __instance.SetObstacleColor(color.Value); } else { __instance.Reset(); } } }
#pragma warning disable SA1313 // Parameter names should begin with lower-case letter private static void Prefix(ObstacleController __instance, ObstacleData obstacleData) #pragma warning restore SA1313 // Parameter names should begin with lower-case letter { if (obstacleData is CustomObstacleData customData) { dynamic dynData = customData.customData; Color?color = ChromaUtils.GetColorFromData(dynData); if (color.HasValue) { __instance.SetObstacleColor(color.Value); } else { __instance.Reset(); } } }