public void LockCurAnimsFrame(string lockinfoStr) { m_LockFramInfo = new LockFrameInfo(lockinfoStr); if (m_LockFramInfo.m_IsNeedCollide) { SkillColliderManager manager = gameObject.GetComponent <SkillColliderManager>(); if (manager == null || manager.GetColliders().Count <= 0) { return; } } AnimationClip cur_anim = GetCurPlayingAnims(); if (cur_anim == null) { return; } m_LockFramInfo.m_LockedAnim = cur_anim; m_LockFramInfo.m_AnimTime = m_Animation[cur_anim.name].time; m_LockFramInfo.m_IsPaused = false; if (m_LockFramInfo.m_RemainTime == 0) { SetLockAnimsSpeed(m_LockFramInfo.m_AfterLockAnimSpeed); m_LockFramInfo = null; } }
public virtual void Init() { m_SkillManager = gameObject.GetComponent <SkillManager>(); m_ObjAnimation = gameObject.GetComponent <Animation>(); m_SkillMovement = gameObject.GetComponent <SkillMovement>(); m_ColliderManager = gameObject.GetComponent <SkillColliderManager>(); }
// Use this for initialization void Start() { m_ColliderManager = gameObject.GetComponent <SkillColliderManager>(); m_SkillMovement = gameObject.GetComponent <SkillMovement>(); m_SelfObjInfo = DashFire.LogicSystem.GetSharedGameObjectInfo(gameObject); if (m_SkillTipObjPrefab != null) { m_SkillTipObj = Instantiate(m_SkillTipObjPrefab, Vector3.zero, Quaternion.identity) as GameObject; m_SkillTipObj.SetActive(false); } if (m_SkillTipObj == null) { Debug.Log("--create skill tip obj failed!"); } int weapon_count = m_WeaponsName.Length; m_Weapons = new Transform[weapon_count]; m_WeaponsParent = new Transform[weapon_count]; for (int i = 0; i < weapon_count; i++) { string name = m_WeaponsName[i]; if (!string.IsNullOrEmpty(name)) { m_Weapons[i] = EffectManager.GetChildNodeByName(gameObject, name); if (m_Weapons[i] != null) { m_WeaponsParent[i] = m_Weapons[i].parent; continue; } } m_Weapons[i] = null; } SkillScript[] skills = gameObject.GetComponents <SkillScript>(); m_Skills.AddRange(skills); m_NewSwordManController = new NewSwordManSkillController(this, m_Skills); m_NewSwordManController.Init(); TouchManager.OnGestureEvent += OnGestureEvent; }
// Use this for initialization void Start() { skill_collide_manager_ = gameObject.GetComponent <SkillColliderManager>(); skill_manager_ = gameObject.GetComponent <SkillManager>(); }
public void SetColliderManager(SkillColliderManager mamager) { m_ColliderManager = mamager; }