162 lines
4.3 KiB
C#
162 lines
4.3 KiB
C#
//using System.Collections.Generic;
|
|
//using UnityEngine;
|
|
//namespace G
|
|
//{
|
|
|
|
// public class Stat_ZhaoyunAvatarAction : Stat_BaseAction
|
|
// {
|
|
// private bool right = true;
|
|
|
|
// private int count;
|
|
|
|
// private Vector3[] pos = new Vector3[3];
|
|
|
|
// private float delay;
|
|
|
|
// private int stat;
|
|
|
|
// private int skillID;
|
|
|
|
// private bool end;
|
|
|
|
// public Stat_ZhaoyunAvatarAction(Stat_StateManager statMgr)
|
|
// : base(statMgr)
|
|
// {
|
|
// }
|
|
|
|
// public override bool Enter(Dictionary<string, object> param, bool clearDelegates = false)
|
|
// {
|
|
// base.Enter(param, clearDelegates);
|
|
// string animName = m_char.GetAnimName("idle");
|
|
// if (m_char.PlayAnimationByName(animName) == -1f)
|
|
// {
|
|
// return false;
|
|
// }
|
|
// skillID = (int)param["skill_id"];
|
|
// m_char.invincible = true;
|
|
// end = false;
|
|
// count = 0;
|
|
// right = true;
|
|
// stat = 0;
|
|
// delay = 0f;
|
|
// ref Vector3 reference = ref pos[0];
|
|
// reference = m_char.GetCurPos() - m_char.transform.right * 0.015f;
|
|
// ref Vector3 reference2 = ref pos[1];
|
|
// reference2 = m_char.GetCurPos();
|
|
// ref Vector3 reference3 = ref pos[2];
|
|
// reference3 = m_char.GetCurPos() + m_char.transform.right * 0.015f;
|
|
// BossSounds.Instance.PlayMenghuo3(m_char);
|
|
// DataStatistics.instance.AddRecord("specificSkill_" + skillID, 1);
|
|
// return true;
|
|
// }
|
|
|
|
// public override bool UpdateDelegate()
|
|
// {
|
|
// delay += Time.deltaTime;
|
|
// if (stat == 0)
|
|
// {
|
|
// if (count == 0)
|
|
// {
|
|
// right = true;
|
|
// }
|
|
// else if (count == 2)
|
|
// {
|
|
// right = false;
|
|
// }
|
|
// if (right)
|
|
// {
|
|
// count++;
|
|
// }
|
|
// else
|
|
// {
|
|
// count--;
|
|
// }
|
|
// m_char.SetCurPos(pos[count]);
|
|
// if (delay > 0.7f)
|
|
// {
|
|
// stat = 1;
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// Vector3 curPos = m_char.GetCurPos();
|
|
// Vector3[] array = new Vector3[4];
|
|
// Transform myTransform = m_char.myTransform;
|
|
// Vector3 forward = myTransform.forward;
|
|
// Vector3 a = myTransform.right;
|
|
// ref Vector3 reference = ref array[0];
|
|
// reference = curPos - forward * 0.1f;
|
|
// ref Vector3 reference2 = ref array[1];
|
|
// reference2 = curPos + forward * 0.1f;
|
|
// ref Vector3 reference3 = ref array[2];
|
|
// reference3 = curPos - a * 0.1f;
|
|
// ref Vector3 reference4 = ref array[3];
|
|
// reference4 = curPos + a * 0.1f;
|
|
// HeroData heroData = (m_char as Player).heroData;
|
|
// SkillData data = SkillData.GetData(skillID);
|
|
// float num = data.m_effects[0].parameter1;
|
|
// float num2 = data.m_effects[0].parameter2;
|
|
// SkillItem skillByTemplateID = heroData.GetSkillManager().getSkillByTemplateID(skillID);
|
|
// int num3 = skillByTemplateID.level;
|
|
// num2 = 10f + (float)num3 * 0.3f;
|
|
// if (heroData != null)
|
|
// {
|
|
// Object @object = (m_char.m_unitType != enCharacterType.CHAR_TYPE_ENEMY_ATTENDANT) ? Resources.Load("Prefab/Player/MyGeneralAvatar") : Resources.Load("Prefab/Player/EnemyGeneralAvatar");
|
|
// if ((bool)@object)
|
|
// {
|
|
// Player component = (@object as GameObject).GetComponent<Player>();
|
|
// if (heroData != null)
|
|
// {
|
|
// for (int i = 0; i < 4; i++)
|
|
// {
|
|
// GeneralAvatar generalAvatar = KMTools.AddChild(null, component) as GeneralAvatar;
|
|
// string text = "w_zhaoyuner_avatar";
|
|
// generalAvatar.m_isAvatar = true;
|
|
// generalAvatar.gameObject.layer = 0;
|
|
// if (m_char.m_unitType == enCharacterType.CHAR_TYPE_ENEMY_ATTENDANT)
|
|
// {
|
|
// generalAvatar.Init(new object[3]
|
|
// {
|
|
// text,
|
|
// array[i],
|
|
// enCharacterType.CHAR_TYPE_ENEMY_ATTENDANT
|
|
// });
|
|
// }
|
|
// else
|
|
// {
|
|
// generalAvatar.Init(new object[3]
|
|
// {
|
|
// text,
|
|
// array[i],
|
|
// enCharacterType.CHAR_TYPE_ATTENDANT
|
|
// });
|
|
// }
|
|
// generalAvatar.SetLiveTime(num2);
|
|
// generalAvatar.AddBuffByID((int)num, null, null, 1, generalAvatar);
|
|
// ((General)m_char).Avatars.Add(generalAvatar.transform);
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// end = true;
|
|
// m_char.invincible = false;
|
|
// SetCurActionState(enStat.STAT_ACTION_IDLE);
|
|
// }
|
|
// return true;
|
|
// }
|
|
|
|
// public override bool CanTransition(enStat stat)
|
|
// {
|
|
// if (stat == enStat.STAT_ACTION_DEAD)
|
|
// {
|
|
// return true;
|
|
// }
|
|
// if (end)
|
|
// {
|
|
// return true;
|
|
// }
|
|
// return false;
|
|
// }
|
|
// }
|
|
//}
|