Ejemplo n.º 1
0
        protected BattleEffectHandler PlayEffect(int effectResId, string bindpoint, float speedRate = 1)
        {
            BattleEffectHandler effect = LoadEffect(effectResId);

            if (effect != null)
            {
                effect.transform.parent        = GetBindPoint(bindpoint);
                effect.transform.localPosition = Vector3.zero;
                effect.transform.localRotation = Quaternion.identity;
                effect.Play(speedRate);
            }

            return(effect);
        }
Ejemplo n.º 2
0
        protected BattleEffectHandler PlayEffect(int effectResId, Vector3 postion, float speedRate = 1)
        {
            BattleEffectHandler effect = LoadEffect(effectResId);

            if (effect != null)
            {
                effect.transform.SetParent(transform);
                effect.transform.position      = postion;
                effect.transform.localRotation = Quaternion.identity;
                effect.Play(speedRate);
            }

            return(effect);
        }