예제 #1
0
        //用于上层逻辑检查通过后调用
        public void StartSkill(int actorId, int skillId, float facedir)
        {
            GameObject obj = LogicSystem.GetGameObject(actorId);

            if (null != obj)
            {
                SkillLogicInfo logicInfo = m_SkillLogicInfos.Find(info => info.Sender == obj && info.SkillId == skillId);
                if (logicInfo != null)
                {
                    return;
                }
                ChangeDir(obj, facedir);
                SkillInstanceInfo inst = NewSkillInstance(skillId);
                if (null != inst)
                {
                    m_SkillLogicInfos.Add(new SkillLogicInfo(obj, inst));
                }
                else
                {
                    LogicSystem.NotifyGfxStopSkill(obj, skillId);
                    return;
                }

                logicInfo = m_SkillLogicInfos.Find(info => info.Sender == obj && info.SkillId == skillId);
                if (null != logicInfo)
                {
                    if (OnGfxShillStart != null)
                    {
                        OnGfxShillStart(obj, skillId);
                    }
                    LogicSystem.NotifyGfxAnimationStart(obj, true);
                    logicInfo.SkillInst.Start(logicInfo.Sender);
                }
            }
        }
예제 #2
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();
    }
예제 #3
0
 protected void GeneralStartImpact(ImpactLogicInfo logicInfo)
 {
     InitLayer(logicInfo.Target, logicInfo);
     LogicSystem.NotifyGfxAnimationStart(logicInfo.Target, false);
     LogicSystem.NotifyGfxMoveControlStart(logicInfo.Target, logicInfo.ImpactId, false);
     InitMovement(logicInfo);
 }
예제 #4
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();
    }
예제 #5
0
 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);
 }
예제 #6
0
        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);
        }
예제 #7
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;
     }
 }
예제 #8
0
    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);
    }
예제 #9
0
    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);
    }