private void StopImpact()
    {
        m_IsStartImpact = false;

        m_AttractImpactElapsed        = 0;
        m_ImpactProcessElapsed        = 0;
        m_ImpactElapsed               = 0;
        m_AttractImpactProcessElapsed = 0;

        m_IsImpacting        = false;
        m_IsAttractImpacting = false;

        Vector3 contactPointNormal = m_BulletInfo.MoveDir * (-1);

        m_BulletInfo.BulletEndEffectInfo.EffectPos += m_HitPos;
        m_BulletInfo.BulletEndEffectInfo.EffectRot += Quaternion.identity.eulerAngles;
        TriggerImpl.PlayEffect(m_BulletInfo.BulletEndEffectInfo);

        foreach (GameObject target in m_TargetAttractInfos)
        {
            if (target != null)
            {
                LogicSystem.NotifyGfxMoveControlFinish(target);
            }
        }
        ProcessSkillImpact(m_BulletInfo.Attacker, m_TargetEndImpactInfos, m_HitPos, m_BulletInfo.ImpactEndInfos);
        ProcessSkillImpactFromSender(m_BulletInfo.Attacker, m_BulletInfo.Attacker,
                                     m_TargetEndFromRoleImpactInfos, m_BulletInfo.ImpactEndFromRoleInfos);

        GameObject.DestroyObject(this.gameObject);
    }
Ejemplo n.º 2
0
    /// <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();
    }
Ejemplo n.º 3
0
    /// param:
    /// example:
    public void Trigger_SwitchWeapon()
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_SwitchWeapon param:");
#endif
        TriggerImpl.SwitchNextWeapon(this.gameObject);
    }
Ejemplo n.º 4
0
    public override bool StartSkill(Vector3 targetPos)
    {
        ResetSkill();
        CDBeginTime = Time.time;
        Vector3 curTargetPos;

        if (UseCurTargetPos)
        {
            if (TriggerImpl.GetCurTargetPos(this.gameObject, out curTargetPos))
            {
                targetPos = curTargetPos;
            }
            else
            {
                return(StopSkill());
            }
        }
        if (UseFaceTargetPos || targetPos == Vector3.zero)
        {
            TargetPos = Script_Util.GetRoleFaceTargetPos(this.gameObject);
        }
        else
        {
            TargetPos = targetPos;
            AdjustTargetPos();
        }
        TriggerImpl.ResetTarget(this.gameObject);
        SkillComponent.ChangeSection((int)SkillSection.ShootStart);
        return(true);
    }
 private void ProcessSkillImpactFromSender(GameObject attacker, GameObject sender,
                                           List <GameObject> targets, SkillImpactInfos impactinfo)
 {
     if (targets == null || targets.Count <= 0 || impactinfo == null)
     {
         return;
     }
     foreach (GameObject target in targets)
     {
         if (target != null)
         {
             Vector3 faceDir = target.transform.position - sender.transform.position;
             faceDir.y = 0;
             ImpactInfo curImpact = TriggerImpl.ExtractBestImpactInfo(target, impactinfo);
             if (curImpact != null)
             {
                 ImpactInfo tImpactInfo = curImpact.Clone() as ImpactInfo;
                 tImpactInfo.m_Velocity = Quaternion.LookRotation(faceDir)
                                          * tImpactInfo.m_Velocity;
                 tImpactInfo.Attacker = sender;
                 ImpactSystem.Instance.SendImpact(attacker, target, tImpactInfo, 1);
                 TriggerImpl.RecordTarget(GetAttacker(), target);
             }
         }
     }
 }
Ejemplo n.º 6
0
    /// param:Id[对应到SkillSceneObjManager中的Missle Id]
    /// example:1
    public void Trigger_SummonMissle(string param)
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_SummonMissle param:" + param);
#endif
        if (m_SceneObjMgr != null)
        {
            SkillSceneObjInfo      sobjInfo   = new SkillSceneObjInfo(param);
            SceneObject_MissleInfo bulletInfo = m_SceneObjMgr.TryGetMissleInfo(sobjInfo.Id);
            IShooterSkill          curSkill   = TriggerImpl.GetCurSkill(this.gameObject);
            if (bulletInfo != null && bulletInfo.SceneObjInfo != null && curSkill != null)
            {
                bulletInfo          = bulletInfo.Clone();
                bulletInfo.Attacker = this.gameObject;
                bulletInfo.SceneObjInfo.EffectPos += this.gameObject.transform.position;
                bulletInfo.MoveStartPos           += this.gameObject.transform.position;
                bulletInfo.MoveTargetPos          += curSkill.GetTargetPos();
                bulletInfo.MoveVelocity            = this.gameObject.transform.rotation * bulletInfo.MoveVelocity;

                GameObject tBulletObj = TriggerImpl.PlayEffect(bulletInfo.SceneObjInfo);
                tBulletObj.SendMessage("Active", bulletInfo);
            }
            else
            {
                Debug.Log("Trigger_SummonMissle null!");
            }
        }
    }
    private void ProcessAttractImpact(GameObject attacker, List <GameObject> targets, Vector3 pos, float attractOff, float disMin)
    {
        if (targets == null || targets.Count <= 0)
        {
            return;
        }

        foreach (GameObject target in targets)
        {
            if (target != null)
            {
                Vector3 attractDir = pos - target.transform.position;
                float   distance   = attractDir.magnitude;
                if (distance >= disMin)
                {
                    Vector3   posOff     = attractDir.normalized * attractOff;
                    Vector3   targetPos  = target.transform.position + posOff;
                    Component controller = target.GetComponent <CharacterController>();
                    if (controller != null)
                    {
                        ((CharacterController)controller).Move(posOff);
                    }
                    else
                    {
                        target.transform.position += posOff;
                    }
                    LogicSystem.NotifyGfxUpdatePosition(target, targetPos.x, targetPos.y, targetPos.z);
                    TriggerImpl.RecordTarget(GetAttacker(), target);
                }
            }
        }
    }
Ejemplo n.º 8
0
    public void ChangeWeapon(SkillWeaponInfo info)
    {
        if (info.IsCurWeapon)
        {
#if SHOOTER_LOG
            Debug.Log("CurWeapon:" + info.Id);
#endif
            m_CurWeaponId = info.Id;
        }
        else if (info.IsCurSubWeapon)
        {
#if SHOOTER_LOG
            Debug.Log("CurWeapon:" + info.Id);
#endif
            m_CurSubWeaponId = info.Id;
        }

        WeaponCmd operate = info.Operate;
        if (WeaponCmd.Hold == operate)
        {
            DropWeapon(info.HoldType);
            HoldWeapon(info.HoldType, info);
        }
        else if (WeaponCmd.HoldOnly == operate)
        {
            DropWeapon(WeaponHand.LeftHand);
            DropWeapon(WeaponHand.RightHand);
            HoldWeapon(info.HoldType, info);
        }
        else if (WeaponCmd.Drop == operate)
        {
            DropWeapon(info.HoldType);
        }
        else if (WeaponCmd.DropAll == operate)
        {
            DropWeapon(WeaponHand.LeftHand);
            DropWeapon(WeaponHand.RightHand);
        }
        else if (WeaponCmd.HoldDefault == operate)
        {
            SkillWeaponInfo defaltInfo = TriggerImpl.GetWeaponInfoById(this.gameObject, DefaultWeaponId);
            if (defaltInfo != null && defaltInfo.Operate != WeaponCmd.HoldDefault)
            {
                ChangeWeapon(defaltInfo);
            }
        }
        else if (WeaponCmd.HoldMain == operate)
        {
            SkillWeaponInfo masterWeaponInfo    = TriggerImpl.GetCurWeaponInfo(this.gameObject, MasterWeaponType.Master);
            SkillWeaponInfo subMasterWeaponInfo = TriggerImpl.GetCurWeaponInfo(this.gameObject, MasterWeaponType.SubMaster);
            if (masterWeaponInfo != null && masterWeaponInfo.Operate != WeaponCmd.HoldMain)
            {
                TriggerImpl.ChangeWeapon(this.gameObject, masterWeaponInfo);
            }
            if (subMasterWeaponInfo != null && masterWeaponInfo.Operate != WeaponCmd.HoldMain)
            {
                TriggerImpl.ChangeWeapon(this.gameObject, subMasterWeaponInfo);
            }
        }
    }
Ejemplo n.º 9
0
    /// param:Id[对应到SkillSceneObjManager中的SkillEffectId]
    /// example:2
    public void Trigger_PlayEffectAtRoleByEffectId(string param)
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_PlayEffectAtRoleByEffectId param:" + param);
#endif
        SkillSceneObjInfo sobjInfo = new SkillSceneObjInfo(param);
        if (m_SceneObjMgr != null)
        {
            SkillEffectInfo effectInfo = m_SceneObjMgr.TryGetSkillEffectInfo(sobjInfo.Id);
            if (effectInfo != null)
            {
                effectInfo = effectInfo.Clone();
                Vector3 pos = this.gameObject.transform.position;
                Vector3 rot = this.gameObject.transform.rotation.eulerAngles;
                if (!string.IsNullOrEmpty(effectInfo.EffectParentBone))
                {
                    Transform t = LogicSystem.FindChildRecursive(this.gameObject.transform, effectInfo.EffectParentBone);
                    if (null != t)
                    {
                        pos = t.position;
                    }
                }
                effectInfo.EffectPos += pos;
                effectInfo.EffectRot += rot;
                TriggerImpl.PlayEffect(effectInfo);
            }
        }
    }
Ejemplo n.º 10
0
    /// param:Id[对应到SkillSceneObjManager中的SkillEffectId]
    /// example:2
    public void Trigger_PlayEffectAtWeaponByEffectId(string param)
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_PlayEffectAtWeaponByEffectId param:" + param);
#endif
        SkillSceneObjInfo sobjInfo      = new SkillSceneObjInfo(param);
        MasterWeaponType  masterType    = (MasterWeaponType)(sobjInfo.ExtractNumeric <int>(0, 0));
        GameObject        curMainWeapon = TriggerImpl.GetCurMainWeapon(this.gameObject, masterType);
        if (m_SceneObjMgr != null && curMainWeapon != null)
        {
            SkillEffectInfo effectInfo = m_SceneObjMgr.TryGetSkillEffectInfo(sobjInfo.Id);
            if (effectInfo != null)
            {
                effectInfo = effectInfo.Clone();
                Vector3 pos = curMainWeapon.transform.position;
                Vector3 rot = curMainWeapon.transform.rotation.eulerAngles;
                if (!string.IsNullOrEmpty(effectInfo.EffectParentBone))
                {
                    Transform t = LogicSystem.FindChildRecursive(curMainWeapon.transform, effectInfo.EffectParentBone);
                    if (null != t)
                    {
                        pos = t.position;
                    }
                }
                effectInfo.EffectPos += pos;
                effectInfo.EffectRot += rot;
                TriggerImpl.PlayEffect(effectInfo);
            }
        }
    }
Ejemplo n.º 11
0
    private void UpdateAfterSkillAutoAttack()
    {
        if (m_WaiteSkillBuffer.Count > 0)
        {
            return;
        }

        if (m_CurSkillNode != null)
        {
            if (Time.time > GetWaitInputTime(m_CurSkillNode))
            {
                return;
            }
            IShooterSkill ss         = m_SkillManager.GetSkillById(m_CurSkillNode.SkillId);
            SkillNode     attackNode = m_SkillCategoryDict[SkillCategory.kAttack];
            if (ss != null && ss.IsAttackAfterSkill() &&
                attackNode != null && IsSkillCanBreak(m_CurSkillNode, attackNode.Category) &&
                m_WaiteSkillBuffer.Count == 0)
            {
                Vector3 targetPos;
                if (TriggerImpl.GetCurTargetPos(m_SkillManager.GetOwner(), out targetPos))
                {
                    SkillInputData data = GetSkillInputData(SkillCategory.kAttack);
                    if (data != null && Vector3.Magnitude(targetPos - m_SkillManager.GetOwner().transform.position) <= data.castRange)
                    {
                        StartAttack(targetPos);
                    }
                }
            }
        }
    }
Ejemplo n.º 12
0
    public void ResetSkillByCategory(SkillCategory category, List <IShooterSkill> skills)
    {
        //Update Category
        int curWeaponId = TriggerImpl.GetCurWeaponId(m_SkillManager.GetOwner());

        if (curWeaponId >= 0)
        {
            List <IShooterSkill> allCategorySkills = GetSkillsByCategory(category, skills);
            List <IShooterSkill> categorySkills    = GetSkillsByWeaponId(curWeaponId, allCategorySkills);
            IShooterSkill        categorySkill     = null;
            if (categorySkills.Count > 0)
            {
                categorySkill = categorySkills[0];
            }
            else
            {
                SkillNode firstNode = null;
                if (m_SkillCategoryDict.TryGetValue(category, out firstNode))
                {
                    categorySkill = GetSkillById(skills, firstNode.SkillId);
                }
            }
            if (categorySkill != null)
            {
                UpdateNextSkillByCategory(categorySkill, skills, curWeaponId);
                ChangeSkillByCategory(category, skills, categorySkill.GetSkillId());
            }
        }
    }
Ejemplo n.º 13
0
    /// param:Id[对应到SkillSceneObjManager中的WeaponInfo Id]
    /// example:1
    public void Trigger_HideRole()
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_HideRole param:");
#endif
        TriggerImpl.ShowGameObject(this.gameObject, false);
    }
Ejemplo n.º 14
0
    /// <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();
    }
Ejemplo n.º 15
0
    //功能:停止StartMove开始的移动,无法停止CurveMove
    public void Trigger_StopMove()
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_StopMove");
#endif
        TriggerImpl.StopMove(this.gameObject);
    }
Ejemplo n.º 16
0
    /// param:Id[对应到SkillSceneObjManager中的Impact Id],verticalHeight[垂直高度],verticalHeightStart[底面起始高度偏移],sectorDegree[角度范围]
    /// example:1,10,-1,60
    public void Trigger_SendVerticalImpact(string param)
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_SendVerticalImpact param:" + param);
#endif
        if (m_SceneObjMgr != null)
        {
            SkillSceneObjInfo sobjInfo            = new SkillSceneObjInfo(param);
            float             verticalHeight      = sobjInfo.ExtractNumeric <float>(0, 10.0f);
            float             verticalHeightStart = sobjInfo.ExtractNumeric <float>(1, 0.0f);
            float             sectorDegree        = sobjInfo.ExtractNumeric <float>(2, 360.0f);
            SkillImpactInfos  bulletInfo          = m_SceneObjMgr.TryGetSkillImpactInfo(sobjInfo.Id);
            IShooterSkill     curSkill            = TriggerImpl.GetCurSkill(this.gameObject);
            if (bulletInfo != null)
            {
                bulletInfo = bulletInfo.Clone();
                TriggerImpl.ProcessVerticalImpact(this.gameObject, this.gameObject, bulletInfo,
                                                  verticalHeight, verticalHeightStart, sectorDegree);
            }
            else
            {
                Debug.Log("Trigger_SendVerticalImpact null!");
            }
        }
    }
Ejemplo n.º 17
0
    public SkillWeaponInfo GetCurMainWeaponInfo(MasterWeaponType masterType = MasterWeaponType.Master)
    {
        int             weaponId = GetCurWeaponId(masterType);
        SkillWeaponInfo info     = TriggerImpl.GetWeaponInfoById(this.gameObject, weaponId);

        return(info);
    }
Ejemplo n.º 18
0
    /// param:Id[对应到SkillSceneObjManager中的SoundEffect Id], pos[场景绝对位置]
    /// example:2,0 2 3
    public void Trigger_PlaySoundAtPosBySoundId(string param)
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_PlaySoundAtPosBySoundId param:" + param);
#endif
        SkillSceneObjInfo sobjInfo  = new SkillSceneObjInfo(param);
        Vector3           targetPos = Vector3.zero;
        try {
            if (sobjInfo.paramOther.Count > 0)
            {
                targetPos = Script_Util.ToVector3(sobjInfo.paramOther[0]);
            }
            else
            {
                Debug.Log("Trigger_PlaySoundAtPosBySoundId miss pos");
                return;
            }
        } catch (System.Exception ex) {
            Debug.Log("Trigger_PlaySoundAtPosBySoundId pos convert error");
            return;
        }

        if (m_SceneObjMgr != null)
        {
            SkillSoundInfo soundInfo = m_SceneObjMgr.TryGetSkillSoundInfo(sobjInfo.Id);
            if (soundInfo != null)
            {
                TriggerImpl.PlaySoundAtPos(soundInfo, targetPos);
            }
        }
        else
        {
            Debug.Log("Trigger_PlaySoundAtPosBySoundId null");
        }
    }
Ejemplo n.º 19
0
    /// param:
    /// example:
    public void Trigger_CanBreakBySkill()
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_CanBreakBySkill");
#endif
        IShooterSkill skillLogic = TriggerImpl.GetCurSkill(this.gameObject);
        if (null != skillLogic)
        {
            skillLogic.SetCanBreakBySkill(true);
        }
    }
Ejemplo n.º 20
0
    public static void ProcessVerticalImpact(GameObject attacker, GameObject sender,
                                             SkillImpactInfos impacts, float verticalHeight = 10.0f, float verticalHeightStart = 0.0f,
                                             float SectorDegree = 360.0f, int hitCount = 1)
    {
        bool isTargeted = false;
        // Find Targets
        Ray ray = new Ray(
            sender.transform.position + new Vector3(0, verticalHeightStart - impacts.ImpactRadius, 0),
            Vector3.up);

        RaycastHit[] targetHitInfos = Physics.SphereCastAll(ray, impacts.ImpactRadius,
                                                            verticalHeight, (int)SceneLayerType.Character);
        Script_Util.DrawPhysicsSphereCastLine(ray, verticalHeight, impacts.ImpactRadius, Color.red, 10.0f);
        int index = 0;

        while (index < targetHitInfos.Length)
        {
            if (targetHitInfos[index].collider == null || targetHitInfos[index].collider.gameObject == null)
            {
                index++;
                continue;
            }

            GameObject target = targetHitInfos[index].collider.gameObject;
            if (target != null)
            {
                Vector3 targetDir = target.transform.position - sender.transform.position;
                targetDir.y = 0;
                Vector3 senderDir = sender.transform.rotation * Vector3.forward;
                if (Mathf.Abs(Vector3.Angle(targetDir, senderDir)) > SectorDegree)
                {
                    index++;
                    continue;
                }

                ImpactInfo curImpact = ExtractBestImpactInfo(target, impacts);
                if (curImpact != null)
                {
                    Vector3 faceDir = target.transform.position - sender.transform.position;
                    faceDir.y = 0;
                    ImpactInfo m_ImpactInfo = curImpact.Clone() as ImpactInfo;
                    m_ImpactInfo.m_Velocity = Quaternion.LookRotation(faceDir)
                                              * m_ImpactInfo.m_Velocity;
                    m_ImpactInfo.Attacker = sender;
                    ImpactSystem.Instance.SendImpact(attacker, target, m_ImpactInfo, hitCount);
                    TriggerImpl.RecordTarget(attacker, target);
                    isTargeted = true;
                }
            }
            index++;
        }
        ProcessImpactLock(attacker, impacts, isTargeted);
    }
Ejemplo n.º 21
0
    private void StopMove()
    {
        m_IsMoving = false;

        m_BulletInfo.MissleHitEffectInfo.EffectPos += gameObject.transform.position;
        m_BulletInfo.MissleHitEffectInfo.EffectRot += Quaternion.identity.eulerAngles;
        TriggerImpl.PlayEffect(m_BulletInfo.MissleHitEffectInfo);

        ForceStopParticles(this.gameObject);

        StartImpact();
    }
Ejemplo n.º 22
0
 public void SwitchNextWeapon()
 {
     if (ShootSwitchWeaponIds != null && ShootSwitchWeaponIds.Count > 0)
     {
         m_CurWeaponIndex = (m_CurWeaponIndex + 1) % ShootSwitchWeaponIds.Count;
         SwitchSkillWeaponInfoPair weaponIdPair = ShootSwitchWeaponIds[m_CurWeaponIndex];
         if (weaponIdPair != null)
         {
             TriggerImpl.ChangeWeaponById(this.gameObject, weaponIdPair.MasterWeaponId);
             TriggerImpl.ChangeWeaponById(this.gameObject, weaponIdPair.SubMasterWeaponId);
         }
     }
 }
Ejemplo n.º 23
0
 private void EndControlGravity()
 {
     m_Vertical = Vector3.zero;
     if (m_IsGravityControl)
     {
         if (GravityDropDownAnimInfo != null)
         {
             TriggerImpl.StopAnim(this.gameObject, GravityDropDownAnimInfo);
         }
         LogicSystem.NotifyGfxAnimationFinish(this.gameObject);
         LogicSystem.NotifyGfxMoveControlFinish(this.gameObject);
         m_IsGravityControl = false;
     }
 }
Ejemplo n.º 24
0
    private void AdjustTargetPos()
    {
        float   weaponHeight    = TriggerImpl.GetWeaponHeight(this.gameObject);
        Vector3 adjustTargetPos = Script_Util.AdjustTargetPos(
            this.gameObject.transform,
            TargetPos,
            Camera.main.transform,
            weaponHeight,
            GunRotate);

        //Debug.Log(string.Format("AdjustTargetPos TargetPos:{0} adjustTargetPos:{1} weaponHeight:{2}",
        //  TargetPos, adjustTargetPos, weaponHeight));
        TriggerImpl.SetFacePos(this.gameObject, adjustTargetPos, YRotateRange);
    }
Ejemplo n.º 25
0
    /// param:Id[对应到SkillSceneObjManager中的WeaponInfo Id]
    /// example:1
    public void Trigger_NotifyIngoreGravity(string param)
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_NotifyIngoreGravity param:" + param);
#endif
        bool ingore = false;
        try {
            ingore = Convert.ToBoolean(param);
        } catch (System.Exception ex) {
            Debug.Log("Trigger_NotifyIngoreGravity err");
            return;
        }
        TriggerImpl.NotifyIngoreGravity(this.gameObject, ingore);
    }
Ejemplo n.º 26
0
 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;
     }
 }
Ejemplo n.º 27
0
    public static void RecordTarget(GameObject target, GameObject target2)
    {
        SkillTargetControl control = target.GetComponent <SkillTargetControl>();

        if (control == null)
        {
            LogicSystem.GfxLog("RecordTarget control miss!");
            return;
        }

        if (TriggerImpl.GetCharacterCamp(target2) != 0)
        {
            control.RecordTarget(target2);
        }
    }
Ejemplo n.º 28
0
    /// <summary>
    /// Triggers
    /// </summary>
    /// param:Id[对应到SkillSceneObjManager中的SkillEffectId]
    /// example:2
    public void Trigger_PlayEffectAtPosByEffectId(string param)
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_PlayEffectByEffectId param:" + param);
#endif
        SkillSceneObjInfo sobjInfo = new SkillSceneObjInfo(param);
        if (m_SceneObjMgr != null)
        {
            SkillEffectInfo effectInfo = m_SceneObjMgr.TryGetSkillEffectInfo(sobjInfo.Id);
            if (effectInfo != null)
            {
                TriggerImpl.PlayEffect(effectInfo);
            }
        }
    }
Ejemplo n.º 29
0
    /// param:Id[对应到SkillSceneObjManager中的WeaponInfo Id]
    /// example:1
    public void Trigger_ChangeMainWeapon()
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_ChangeWeapon param:" + param);
#endif
        SkillWeaponInfo masterWeaponInfo    = TriggerImpl.GetCurWeaponInfo(this.gameObject, MasterWeaponType.Master);
        SkillWeaponInfo subMasterWeaponInfo = TriggerImpl.GetCurWeaponInfo(this.gameObject, MasterWeaponType.SubMaster);
        if (masterWeaponInfo != null)
        {
            TriggerImpl.ChangeWeapon(this.gameObject, masterWeaponInfo);
        }
        if (subMasterWeaponInfo != null)
        {
            TriggerImpl.ChangeWeapon(this.gameObject, subMasterWeaponInfo);
        }
    }
    private void StopMove()
    {
        m_MoveDuration = 0;
        m_MoveElapsed  = 0;
        m_IsMoving     = false;

        Vector3 contactPointNormal = m_BulletInfo.MoveDir * (-1);

        m_BulletInfo.BulletHitEffectInfo.EffectPos += m_HitPos;
        m_BulletInfo.BulletHitEffectInfo.EffectRot += Quaternion.identity.eulerAngles;
        TriggerImpl.PlayEffect(m_BulletInfo.BulletHitEffectInfo);

        ForceStopParticles(this.gameObject);

        StartImpact();
    }