Beispiel #1
0
    /// <summary>
    /// 创建攻击者位置改变表现
    /// </summary>
    /// <param name="fStartTime"></param>
    /// <param name="fAnimEndTime"></param>
    /// <param name="dataSkillShow"></param>
    /// <returns></returns>
    private float BuildAttackPosChangeShow(float fStartTime, ref float fAnimEndTime, DataSkillShow dataSkillShow)
    {
        float time      = fStartTime;
        float delayTime = dataSkillShow == null ? 0f : dataSkillShow.AttackJumpStartDelayTime;

        foreach (var current in this.AttackerPosChanges)
        {
            ChangePosTrigger trigger = new ChangePosTrigger();
            trigger.controlData = current;
            trigger.StartTime   = time + delayTime;
            if (dataSkillShow != null)
            {
                trigger.JumpEndAnim  = dataSkillShow.AttackJumpEndAnim;
                trigger.JumpDuraAnim = dataSkillShow.AttackJumpDuraAnim;
                if (current.type == ChangePosType.e_Jump)
                {
                    trigger.Jumptime = ((dataSkillShow.AttackJumpSpeed <= 0f) ? dataSkillShow.AttackJumpTime : (this.GetDistanceByPos(current.DestPos[0]) / dataSkillShow.AttackJumpSpeed));
                    trigger.EffectId = dataSkillShow.AttackJumpEffect;
                    trigger.Height   = dataSkillShow.AttackJumpHeight;
                }
                else if (current.type == ChangePosType.e_Walk)
                {
                    trigger.EffectId = dataSkillShow.AttackJumpEffect;
                }
            }
            trigger.Duration  = trigger.GetDuration();
            trigger.SkillId   = this.SkillId;
            trigger.IsForward = SkillGameManager.IsAttackForward(this.SkillId);
            if (!current.IgnoreDuration)
            {
                time         = trigger.StartTime + trigger.Duration + 0.1f;
                fAnimEndTime = time;
            }
            if (this.BeAttackerList.Count > 0 && this.AttackerId != this.BeAttackerList[0])
            {
                trigger.TargetPlayerID = this.BeAttackerList[0];
            }
            base.AddEvent(trigger);
        }
        return(time);
    }