Example #1
0
 protected override void init()
 {
     character = new GunGirl();
     m_SkeletonAnim.state.Complete += OnComplete;
     for (int i = 0; i < m_behaviors.Count; i++)
     {
         if (animToState.ContainsKey(m_behaviors[i].animName))
             animToState[m_behaviors[i].animName].animCurve = m_behaviors[i].curve;
         else Debug.LogError("GunGirlController AnimationCurve Init Error: No " + m_behaviors[i].animName);
     }
     character.xDirection = Global.GlobalValue.XDIRECTION_RIGHT;
     transform.localScale = Vector3.right * transform.localScale.x * -character.xDirection + Vector3.one - Vector3.right;
     character.curState = null;
     attackEffectPool = EffectPoolManager.GetAttackEffectPoolByType(character.characterType);
 }
Example #2
0
 protected override void init()
 {
     character = new GunGirl();
     Sound sound;
     for (int i = 0; i < soundLists.Count; i++)
     {
         sound = soundLists[i];
         if (animToState.ContainsKey(sound.animName)) animToState[sound.animName].SetAudioClip(sound.audioClip);
         else Debug.LogError("SoundLists中声音文件动画名找不到对应动画!");
     }
     for (int i = 0; i < m_behaviors.Count; i++)
     {
         if (animToState.ContainsKey(m_behaviors[i].animName))
             animToState[m_behaviors[i].animName].animCurve = m_behaviors[i].curve;
         else Debug.LogError("GunGirlController AnimationCurve Init Error: No " + m_behaviors[i].animName);
     }
     base.init();
 }
 void Awake() {
     character = new GunGirl();
     character.xDirection = Player.instance.xDirection;
     transform.localScale = new Vector3(character.xDirection, 1, 1);
     character.curState = null;
 }