protected void GeneralStartImpact(ImpactLogicInfo logicInfo) { InitLayer(logicInfo.Target, logicInfo); LogicSystem.NotifyGfxAnimationStart(logicInfo.Target, false); LogicSystem.NotifyGfxMoveControlStart(logicInfo.Target, logicInfo.ImpactId, false); InitMovement(logicInfo); }
/// <summary> /// Sections /// </summary> private void OnShootStart() { // Notify TriggerImpl.StopAllAnim(this.gameObject); LogicSystem.NotifyGfxAnimationStart(gameObject); if (ControlMove) { LogicSystem.NotifyGfxMoveControlStart(gameObject); } // Weapon TriggerImpl.ChangeWeaponById(this.gameObject, WeaponId); TriggerImpl.ChangeWeaponById(this.gameObject, SubWeaponId); // Animation TriggerImpl.PlayAnim(this.gameObject, ShootAnimInfo); SkillDuration = Mathf.Max(TriggerImpl.GetAnimTime(this.gameObject, ShootAnimInfo), SkillDuration); if (SupportRotateByHold) { DashFire.LogicSystem.EventChannelForGfx.Publish("ge_touch_dir", "ui", true); } if (SupportRotateByJoyStick) { TriggerImpl.ShowJoyStick(this.gameObject); } TriggerImpl.StartMoveById(this.gameObject, StartMovementId); SkillComponent.ChangeNextSection(); }
private void AddAttachObject(Collider collider) { GameObject parent = m_ColliderInfo.GetCollider(); if (parent == null) { return; } AttachConfig attach_config = m_ColliderInfo.GetAttachConfig(); AttachTargetInfo attach_info = new AttachTargetInfo(); attach_info.ParentObj = parent; attach_info.TargetObj = collider.gameObject; attach_info.AttachNode = TriggerUtil.GetChildNodeByName(collider.gameObject, attach_config.AttachNodeName); UnityEngine.Vector3 hit_pos = parent.GetComponent <Collider>().ClosestPointOnBounds(attach_info.AttachNode.position); attach_info.ParentPos = attach_info.ParentObj.transform.InverseTransformPoint(hit_pos); attach_info.Rotate = attach_config.AttachRotation; attach_info.MoveControler = attach_info.TargetObj.GetComponent <CharacterController>(); m_AttachedObjects.Add(attach_info); UpdateAttachTargetPos(attach_info); LogicSystem.NotifyGfxMoveControlStart(attach_info.TargetObj, m_OwnSkill.SkillId, true); //Debug.Log("---AttachImpact: send " + attach_config.AttachImpact + " to " + attach_info.TargetObj.name); m_DamageManager.SendImpactToObject(m_DamageManager.GetOwner(), collider.gameObject, attach_config.AttachImpact, attach_config.AttachImpactTime, m_OwnSkill.SkillId, m_CurHitCountId); }
private void StartImpact() { m_IsStartImpact = true; m_AttractImpactElapsed = 0; m_ImpactProcessElapsed = 0; m_ImpactElapsed = 0; m_AttractImpactProcessElapsed = 0; m_IsAttractImpacting = (m_BulletInfo.ImpactAttractDuration > 0); m_IsImpacting = (m_BulletInfo.ImpactDuration > 0); m_TargetAttractInfos = FindTarget(m_HitPos, m_BulletInfo.ImpactAttractRange, (int)(SceneLayerType.Character)); m_TargetImpactInfos = FindTarget(m_HitPos, m_BulletInfo.ImpactInfos.ImpactRadius, (int)(SceneLayerType.Character)); m_TargetEndImpactInfos = FindTarget(m_HitPos, m_BulletInfo.ImpactEndInfos.ImpactRadius, (int)(SceneLayerType.Character)); m_TargetEndFromRoleImpactInfos = FindTarget(m_HitPos, m_BulletInfo.ImpactEndFromRoleInfos.ImpactRadius, (int)(SceneLayerType.Character)); foreach (GameObject target in m_TargetAttractInfos) { if (target != null) { LogicSystem.NotifyGfxMoveControlStart(target); } } }
/// <summary> /// Sections /// </summary> private void OnShootStart() { DashFire.LogicSystem.EventChannelForGfx.Publish("ge_ex_skill", "ui", "GunWoman", true); // Notify TriggerImpl.StopAllAnim(this.gameObject); LogicSystem.NotifyGfxAnimationStart(gameObject); if (ControlMove) { LogicSystem.NotifyGfxMoveControlStart(gameObject); } // Weapon TriggerImpl.ChangeWeaponById(this.gameObject, WeaponId); TriggerImpl.ChangeWeaponById(this.gameObject, SubWeaponId); // Animation m_StartEndTs = TriggerImpl.GetAnimTime(this.gameObject, ShootStartAnimInfo); m_HoldEndTs = ShootHoldTime + m_StartEndTs; m_MissleEndTs = m_HoldEndTs + SkillDuration; SkillDuration = m_MissleEndTs + TriggerImpl.GetAnimTime(this.gameObject, ShootEndAnimInfo); TriggerImpl.PlayAnims(this.gameObject, ShootStartAnimInfo); DashFire.LogicSystem.EventChannelForGfx.Publish("ge_touch_dir", "ui", true); SkillComponent.ChangeNextSection(); }
public virtual bool StartSkill() { if (!CanStart()) { return(false); } ImpactSystem.Instance.StopAllImpacts(gameObject); LogicSystem.NotifyGfxAnimationStart(gameObject); if (m_IsControlMove) { LogicSystem.NotifyGfxMoveControlStart(gameObject); } m_Status = MyCharacterStatus.kSkilling; m_StartTime = Time.time; m_IsSkillActive = true; m_IsHaveCollideMoveCurve = false; m_ClampedTime = 0; if (m_ColliderManager != null) { m_ColliderManager.ClearColliders(); } if (m_RageCast > 0) { DashFire.SharedGameObjectInfo selfObjInfo = DashFire.LogicSystem.GetSharedGameObjectInfo(gameObject); DashFire.LogicSystem.NotifyGfxHitTarget(gameObject, m_CostImpact, gameObject, 0); } return(true); }
public override void StartImpact(ImpactLogicInfo logicInfo) { LogicSystem.NotifyGfxAnimationStart(logicInfo.Target, false); SharedGameObjectInfo shareInfo = LogicSystem.GetSharedGameObjectInfo(logicInfo.Target); PlayAnimation(logicInfo.Target, Animation_Type.AT_Grab); LogicSystem.NotifyGfxMoveControlStart(logicInfo.Target, logicInfo.ImpactId, false); SetGfxStateFlag(logicInfo.Target, Operate_Type.OT_AddBit, GfxCharacterState_Type.Grab); }
private void StartControlGravity() { if (!m_IsGravityControl) { LogicSystem.NotifyGfxAnimationStart(this.gameObject); LogicSystem.NotifyGfxMoveControlStart(this.gameObject); if (GravityDropDownAnimInfo != null) { TriggerImpl.PlayAnim(this.gameObject, GravityDropDownAnimInfo); } m_Vertical = Vector3.zero; m_IsGravityControl = true; } }
protected void GeneralStartSkill() { m_IsActive = true; m_LastTriggerTime = Time.time; m_EffectList.Clear(); SharedGameObjectInfo info = LogicSystem.GetSharedGameObjectInfo(gameObject); if (null != info) { LogicSystem.PublishLogicEvent("ge_set_ai_enable", "ai", info.m_LogicObjectId, false); } LogicSystem.NotifyGfxAnimationStart(gameObject); LogicSystem.NotifyGfxMoveControlStart(gameObject); }
public override bool Execute(object sender, SkillInstance instance, long delta, long curSectionTime) { UnityEngine.GameObject obj = sender as UnityEngine.GameObject; if (null != obj) { if (m_IsControlMove) { LogicSystem.NotifyGfxMoveControlStart(obj, instance.SkillId, true); } else { LogicSystem.NotifyGfxMoveControlFinish(obj, instance.SkillId, true); } instance.IsControlMove = m_IsControlMove; //LogSystem.Debug("movecontrol:{0}", m_IsControlMove); } return(false); }
protected void GeneralStartImpact(ImpactInfo impactInfo) { m_StartTime = Time.time; m_IsActive = true; m_ImpactInfo = impactInfo; m_ImpactInfo.ApplyOffset(m_ImpactInfo.m_Offset); m_IsHitHighLight = m_ImpactInfo.m_IsHitHighLight; m_HitHilghtLightTime = m_ImpactInfo.m_HitHighLightTime; ComputeDirectionAndSpeed(); m_CurVelocity = m_ImpactInfo.m_Velocity; if (!m_ImpactInfo.m_Velocity.Equals(Vector3.zero)) { if (Vector3.Dot(m_ImpactInfo.m_Velocity, this.transform.forward) > 0) { m_HitDirection = HitDirection.BACK; } else { m_HitDirection = HitDirection.FRONT; } } if (m_IsHitHighLight && null != m_HighLightMaterial) { m_Renderer.material = m_HighLightMaterial; } InterruptSkill(); SharedGameObjectInfo info = LogicSystem.GetSharedGameObjectInfo(gameObject); ImpactPlaySound(); if (null != info) { LogicSystem.PublishLogicEvent("ge_set_ai_enable", "ai", info.m_LogicObjectId, false); } LogicSystem.NotifyGfxAnimationStart(gameObject); LogicSystem.NotifyGfxMoveControlStart(gameObject); }
public void StartMove(SkillMovementInfo info) { LogicSystem.NotifyGfxMoveControlStart(gameObject); m_MovementCom.Reset(); m_MovementCom.StartMove(this.gameObject, info); }