private static void DoXpGive(MinionStartingStats __instance, GameObject go) { __instance.Apply(go); var resume = go.GetComponent <MinionResume>(); var config = AdvancedStartOptions.GetConfig(); resume.AddExperience(XPForSkillPoints(config.startSkillPoints)); }
private void SpawnMinion() { GameObject gameObject = Util.KInstantiate(Assets.GetPrefab(MinionConfig.ID), null, null); gameObject.name = Assets.GetPrefab(MinionConfig.ID).name; Immigration.Instance.ApplyDefaultPersonalPriorities(gameObject); Vector3 position = Grid.CellToPosCBC(currentCell, Grid.SceneLayer.Move); gameObject.transform.SetLocalPosition(position); gameObject.SetActive(true); MinionStartingStats minionStartingStats = new MinionStartingStats(false, null); minionStartingStats.Apply(gameObject); }
private void SpawnMinion() { if (!((UnityEngine.Object)Immigration.Instance == (UnityEngine.Object)null)) { if (!Grid.IsValidBuildingCell(GetMouseCell())) { PopFXManager.Instance.SpawnFX(PopFXManager.Instance.sprite_Negative, UI.DEBUG_TOOLS.INVALID_LOCATION, null, GetMousePos(), 1.5f, false, true); } else { GameObject gameObject = Util.KInstantiate(Assets.GetPrefab(MinionConfig.ID), null, null); gameObject.name = Assets.GetPrefab(MinionConfig.ID).name; Immigration.Instance.ApplyDefaultPersonalPriorities(gameObject); Vector3 position = Grid.CellToPosCBC(GetMouseCell(), Grid.SceneLayer.Move); gameObject.transform.SetLocalPosition(position); gameObject.SetActive(true); MinionStartingStats minionStartingStats = new MinionStartingStats(false, null); minionStartingStats.Apply(gameObject); } } }