public void Sell() { StopAllCoroutines(); SpriteEffect effect = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEffectFromPool((int)EffectTable.eEffectType.Type_Tower_Sell, out effect)) { effect.Init(transform); } else { EffectTable.TableRow effectTable = null; if (EffectTable.Instance.FindTable((int)EffectTable.eEffectType.Type_Tower_Sell, out effectTable)) { LoadAssetbundle.LoadPrefabCB loadPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadDestroyEffectCompleteCB); PrefabManager.Instance.LoadPrefab(effectTable.effectPath, System.Guid.NewGuid(), loadPrefabCB, effectTable); } } if (TowerManager.Instance != null) { TowerManager.Instance.RemoveTowerList(this); } if (PoolManager.Instance != null) { PoolManager.Instance.AddTowerPool(this); } if (GameManager.Instance != null) { GameManager.Instance.AddGameGold(status.GetSellPrice); } }
private void InitHpBar() { if (hpBar != null) { SetHpBar(); } else { LoadAssetbundle.LoadPrefabCB loadPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadHpBarCompleteCB); PrefabManager.Instance.LoadPrefab("UI/UI_Object/Enemy_Hp_Bar", System.Guid.NewGuid(), loadPrefabCB); } }
private IEnumerator InitUI() { LoadAssetbundle.LoadPrefabCB loadUICompleteCB = null; for (int i = 0; i < uiPathArray.Length; i++) { loadUICompleteCB = new LoadAssetbundle.LoadPrefabCB(LoadUICompleteCB); PrefabManager.Instance.LoadPrefab(uiPathArray[i], System.Guid.NewGuid(), loadUICompleteCB, i); yield return(null); } isLoadUIComplete = true; }
private IEnumerator InitUI() { LoadAssetbundle.LoadPrefabCB loadUICompleteCB = null; for (int i = 0; i < lobbyPanelPathArray.Length; i++) { if (lobbyPanelPathArray[i].isLoadOnStart) { loadUICompleteCB = new LoadAssetbundle.LoadPrefabCB(LoadUICompleteCB); PrefabManager.Instance.LoadPrefab(lobbyPanelPathArray[i].path, System.Guid.NewGuid(), loadUICompleteCB, lobbyPanelPathArray[i].type); } yield return(null); } }
private void AddFragmentEffect() { SkeletonEffect effect = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEffectFromPool(eEffectType.Type_Fragment, out effect)) { effect.Init(damageDummy != null ? damageDummy : transform); } else { LoadAssetbundle.LoadPrefabCB loadEffectPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadEffectCompleteCB); PrefabManager.Instance.LoadPrefab(GameManager.Instance.GetCastle.fragmentEffectPath, System.Guid.NewGuid(), loadEffectPrefabCB); } }
private void AddCriticalEffect() { SkeletonEffect effect = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEffectFromPool(eEffectType.Type_Critical, out effect)) { effect.Init(damageDummy != null ? damageDummy : transform); } else { LoadAssetbundle.LoadPrefabCB loadEffectPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadEffectCompleteCB); PrefabManager.Instance.LoadPrefab("Effect/Critical_Effect", System.Guid.NewGuid(), loadEffectPrefabCB); } }
public void SetSkillEffect() { SkeletonEffect effect = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEffectFromPool(eEffectType.Type_Add_Skill_Point, out effect)) { effect.Init(SKILL_GET_POSITION, true); } else { LoadAssetbundle.LoadPrefabCB loadEffectPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadEffectCompleteCB); PrefabManager.Instance.LoadPrefab("Effect/Get_Skill_Effect", System.Guid.NewGuid(), loadEffectPrefabCB, SKILL_GET_POSITION, true); } }
public void SetBuffText(string text) { UIDamageText buffText = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEffectTextFromPool(out buffText)) { buffText.Init(transform, text); } else { LoadAssetbundle.LoadPrefabCB loadBuffTextPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadBuffTextCompleteCB); PrefabManager.Instance.LoadPrefab("Effect/Text_Effect", System.Guid.NewGuid(), loadBuffTextPrefabCB, text); } }
private IEnumerator Preload() { // 이펙트 string[] effectPathArray = { "Effect/Lobby_Touch_Effect" }; for (int i = 0; i < effectPathArray.Length; i++) { LoadAssetbundle.LoadPrefabCB loadEffectPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadPreloadEffectCompleteCB); PrefabManager.Instance.LoadPrefab(effectPathArray[i], System.Guid.NewGuid(), loadEffectPrefabCB); yield return(null); } StartCoroutine("InitUI"); }
private void SetDamageText(int damage, eDamageTextType type) { UIDamageText damageText = null; if (PoolManager.Instance != null && PoolManager.Instance.GetDamageTextFromPool(type, out damageText)) { damageText.Init(damageDummy != null ? damageDummy : transform, damage); } else { LoadAssetbundle.LoadPrefabCB loadDamageTextPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadDamageTextCompleteCB); PrefabManager.Instance.LoadPrefab(GameManager.Instance.GetDamagePath(type), System.Guid.NewGuid(), loadDamageTextPrefabCB, damage); } }
private void SetDamageText(DamageParam param) { UIDamageText damageText = null; if (PoolManager.Instance != null && PoolManager.Instance.GetDamageTextFromPool(out damageText)) { damageText.Init(effectDummy, param); } else { LoadAssetbundle.LoadPrefabCB loadDamageTextPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadDamageTextCompleteCB); PrefabManager.Instance.LoadPrefab("Effect/Text_Damage", System.Guid.NewGuid(), loadDamageTextPrefabCB, param); } }
public void MakeEnemy(int level, EnemyTable.TableRow table) { Enemy enemy = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEnemyFromPool(table.id, out enemy)) { enemy.Init(level, table); } else { LoadAssetbundle.LoadPrefabCB loadPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadEnemyCompleteCB); PrefabManager.Instance.LoadPrefab(table.path, System.Guid.NewGuid(), loadPrefabCB, level, table); } }
private void SetTouchEffect(Vector3 touchPos) { SkeletonEffect effect = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEffectFromPool(eEffectType.Type_Touch, out effect)) { effect.Init(touchPos); } else { LoadAssetbundle.LoadPrefabCB loadEffectPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadEffectCompleteCB); PrefabManager.Instance.LoadPrefab("Effect/Lobby_Touch_Effect", System.Guid.NewGuid(), loadEffectPrefabCB, touchPos, false); } }
public void OpenShop() { if (uiShop != null) { uiShop.OpenFrame(); } else { int index = GetLobbyPanelPathIndex(eUIType.Type_Shop); LoadAssetbundle.LoadPrefabCB loadUICompleteCB = new LoadAssetbundle.LoadPrefabCB(LoadUICompleteCB); PrefabManager.Instance.LoadPrefab(lobbyPanelPathArray[index].path, System.Guid.NewGuid(), loadUICompleteCB, eUIType.Type_Shop, true); } }
private void LoadAttackEffect(Transform target, SpriteEffect.EffectCompleteCB effectCompleteCB) { if (status.GetEffectTable != null) { SpriteEffect effect = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEffectFromPool(status.GetEffectTable.id, out effect)) { effect.Init(target, effectCompleteCB); } else { LoadAssetbundle.LoadPrefabCB loadEffectCB = new LoadAssetbundle.LoadPrefabCB(LoadAttackEffectCompleteCB); PrefabManager.Instance.LoadPrefab(status.GetEffectTable.effectPath, System.Guid.NewGuid(), loadEffectCB, target, status.GetEffectTable, effectCompleteCB); } } }
private void SetDamageEffect(DamageParam param) { SpriteEffect effect = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEffectFromPool(param.GetDamageEffectID, out effect)) { effect.Init(effectDummy); } else { EffectTable.TableRow effectTable = null; if (EffectTable.Instance.FindTable(param.GetDamageEffectID, out effectTable)) { LoadAssetbundle.LoadPrefabCB loadDamageEffectPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadDamageEffectCompleteCB); PrefabManager.Instance.LoadPrefab(effectTable.effectPath, System.Guid.NewGuid(), loadDamageEffectPrefabCB, effectTable); } } }
private void SetShot() { int hashID = Animator.StringToHash(enemyStatus.table.attackEffectPath); Vector3 targetPos = GameManager.Instance.GetEnemyEndPos(enemyStatus.floorIndex); EnemyShot shot = null; if (PoolManager.Instance != null && PoolManager.Instance.GetEnemyShotFromPool(hashID, out shot)) { shot.Init(hashID, enemyStatus.table, effectDummy.position, targetPos); } else { LoadAssetbundle.LoadPrefabCB loadPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadShotCompleteCB); PrefabManager.Instance.LoadPrefab(enemyStatus.table.attackEffectPath, System.Guid.NewGuid(), loadPrefabCB, hashID, enemyStatus.table, effectDummy.position, targetPos); } }
private IEnumerator InitUI() { lobbyTabGroup = new LobbyState[(int)eUILobbyTab.Type_End]; LoadAssetbundle.LoadPrefabCB loadUICompleteCB = null; for (int i = 0; i < lobbyPanelPathArray.Length; i++) { if (lobbyPanelPathArray[i].isLoadOnStart) { loadUICompleteCB = new LoadAssetbundle.LoadPrefabCB(LoadUICompleteCB); PrefabManager.Instance.LoadPrefab(lobbyPanelPathArray[i].path, System.Guid.NewGuid(), loadUICompleteCB, lobbyPanelPathArray[i].type); } yield return(null); } if (uiLobby != null) { uiLobby.OpenFrame(); } }
private IEnumerator Preload() { // 이펙트 List <EffectTable.TableRow> effectTable = null; if (EffectTable.Instance != null && EffectTable.Instance.GetTable(out effectTable)) { for (int i = 0; i < effectTable.Count; i++) { LoadAssetbundle.LoadPrefabCB loadDamageEffectPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadDamageEffectCompleteCB); PrefabManager.Instance.LoadPrefab(effectTable[i].effectPath, System.Guid.NewGuid(), loadDamageEffectPrefabCB, effectTable[i]); yield return(null); } } // 텍스트 LoadAssetbundle.LoadPrefabCB loadDamageTextPrefabCB = new LoadAssetbundle.LoadPrefabCB(LoadDamageTextCompleteCB); PrefabManager.Instance.LoadPrefab("Effect/Text_Damage", System.Guid.NewGuid(), loadDamageTextPrefabCB); StartCoroutine("InitUI"); }
private void LoadAttackEffect() { if (status.GetEffectTable != null) { SpriteEffect effect = null; for (int i = 0; i < weaponEffectDummyArray.Length; i++) { if (weaponEffectDummyArray[i].activeInHierarchy) { if (PoolManager.Instance != null && PoolManager.Instance.GetEffectFromPool(status.GetEffectTable.id, out effect)) { SetAttackEffect(effect, weaponEffectDummyArray[i].transform); } else { LoadAssetbundle.LoadPrefabCB loadEffectCB = new LoadAssetbundle.LoadPrefabCB(LoadAttackEffectCompleteCB); PrefabManager.Instance.LoadPrefab(status.GetEffectTable.effectPath, System.Guid.NewGuid(), loadEffectCB, weaponEffectDummyArray[i].transform, status.GetEffectTable); } } } } }
public void SetCameraFade(SupportUtil.CameraFadeCB fadeCB, params object[] param) { LoadAssetbundle.LoadPrefabCB loadUICompleteCB = new LoadAssetbundle.LoadPrefabCB(LoadCameraFadeCompleteCB); PrefabManager.Instance.LoadPrefab("Object/CameraFade", System.Guid.NewGuid(), loadUICompleteCB, fadeCB, param); }