예제 #1
0
        public static void Patch()
        {
            SeraLogger.PatchStart(modName, "2.1.0");
            try
            {
                AssetBundle ab = AssetBundle.LoadFromFile(assetBundle);
                BiomeHUD = ab.LoadAsset("biomeCanvas") as GameObject;

                CompassCore.PatchCompasses();

                BiomeDisplayOptions savedSettings = new BiomeDisplayOptions();
                OptionsPanelHandler.RegisterModOptions(savedSettings);
                animationsEnabled = savedSettings.animationEnabled;
                imagesEnabled     = savedSettings.imageEnabled;
                imageAlpha        = savedSettings.alphaValue;
                showCoords        = savedSettings.coordsEnabled;

                var harmony = HarmonyInstance.Create("seraphimrisen.biomehudindicator.mod");
                harmony.PatchAll(Assembly.GetExecutingAssembly());

                SeraLogger.PatchComplete(modName);
            }
            catch (Exception ex)
            {
                SeraLogger.PatchFailed(modName, ex);
            }
        }
    private void Start()
    {
        Instance  = this;
        Compass   = GameObject.Find("CompassIndi");
        CompassUI = GameObject.Find("CompassText");
        RotText   = CompassUI.GetComponent <Text>();
        InitStatusNum();
        RotText.text = CarStatusNum0TO360[0];

        gyroEnabled = EnableGyro();

        AngleFromN = 0;
    }