Exemplo n.º 1
0
    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);
        }
    }
Exemplo n.º 2
0
    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);
        }
    }
Exemplo n.º 3
0
    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);
        }
    }
Exemplo n.º 4
0
    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);
        }
    }
Exemplo n.º 5
0
    private void LoadEffectCompleteCB(GameObject gameObj, System.Guid uid, params object[] param)
    {
        if (gameObj != null)
        {
            GameObject createObj = Instantiate(gameObj) as GameObject;

            createObj.transform.parent     = rootArray[(int)eRootType.Type_Object].transform;
            createObj.transform.localScale = gameObj.transform.localScale;

            SkeletonEffect effect = createObj.GetComponent <SkeletonEffect>();
            if (effect != null)
            {
                effect.Init((Vector3)param[0], (bool)param[1]);
            }
        }
    }
Exemplo n.º 6
0
    private void LoadEffectCompleteCB(GameObject gameObj, System.Guid uid, params object[] param)
    {
        if (gameObj != null)
        {
            GameObject createObj = Instantiate(gameObj) as GameObject;

            createObj.transform.parent     = GameManager.Instance.rootArray[(int)GameManager.eRootType.Type_Object].transform;
            createObj.transform.localScale = gameObj.transform.localScale;

            SkeletonEffect effect = createObj.GetComponent <SkeletonEffect>();
            if (effect != null)
            {
                effect.Init(damageDummy != null ? damageDummy : transform);
            }
        }
    }