コード例 #1
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);
    }