예제 #1
0
파일: CBattlefield.cs 프로젝트: zlbsy/sh109
        public GameObject CreateEffect(string name, Transform trans)
        {
            GameObject obj = Instantiate(CBattlefield.effectAnimation.gameObject);

            obj.transform.SetParent(trans);
            obj.transform.localScale       = new Vector3(1.2f, 1.2f, 1.2f);
            obj.transform.localPosition    = new Vector3(0f, 0.2f, 0f);
            obj.transform.localEulerAngles = new Vector3(-30f, 0f, 0f);
            VEffectAnimation.AddEffectAnimation(obj);
            VEffectAnimation effect = obj.GetComponent <VEffectAnimation>();

            effect.animator.Play(name);
            return(obj);
        }
예제 #2
0
파일: CBattlefield.cs 프로젝트: zlbsy/sh109
 public override void OnDestroy()
 {
     CBattlefield.effectAnimation = null;
     base.OnDestroy();
 }