예제 #1
0
 public void OnPlayerHitObstacle()
 {
     if (m_batu)
     {
         return;
     }
     Debug.Log("chay endgame trong game controller");
     obstacles.Reset();
     Endgame();
 }
예제 #2
0
        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();
                }
            }
        }
예제 #3
0
        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();
                }
            }
        }
예제 #4
0
#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();
                }
            }
        }