public void Awake() { Instance = this; PieceManager.Instance.AddPieceTable(PlanPiecePrefab.PlanHammerPieceTableName); // Configs SetupConfig(); // Init Blueprints Assembly assembly = typeof(PlanBuildPlugin).Assembly; AssetBundle blueprintsBundle = AssetUtils.LoadAssetBundleFromResources("blueprints", assembly); blueprintRunePrefab = new BlueprintRunePrefab(blueprintsBundle); blueprintsBundle.Unload(false); BlueprintManager.Instance.Init(); AssetBundle planbuildBundle = AssetUtils.LoadAssetBundleFromResources("planbuild", assembly); planTotemPrefab = new PlanTotemPrefab(planbuildBundle); planbuildBundle.Unload(false); // Init Shader ShaderHelper.planShader = Shader.Find("Lux Lit Particles/ Bumped"); // Harmony patching Patches.Apply(); // Hooks ItemManager.OnVanillaItemsAvailable += AddClonedItems; ItemManager.OnItemsRegistered += OnItemsRegistered; On.Player.Awake += OnPlayerAwake; }
private void UpdatePlanTotem(object sender, EventArgs e) { planTotemPrefab.SettingsUpdated(); foreach (PlanTotem planTotem in PlanTotem.m_allPlanTotems) { PlanTotemPrefab.UpdateGlowColor(planTotem.gameObject); } }