RPG项目01_技能释放

基于“RPG项目01_新输入输出”,

修改脚本文件夹中的SkillBase脚本:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

//回复技能,魔法技能,物理技能
public enum SkillType { Up, Magic, Physics };
public class SkillBase : MonoBehaviour{
    protected GameObject prefab;
    protected SkillType type;//类型
    protected string path = "Skill/";
    protected string skillName;
    protected int attValue;
    public int mp;
    protected People from;//从人物释放
    protected People tPeople;//敌人目标
    protected Dictionary<SkillType, UnityAction> typeWithSkill =
        new Dictionary<SkillType, UnityAction>();
    protected float time = 0;//计时器
    protected float skillTime;//技能冷却时间
    protected float delayTime;//延迟时间
    protected float offset;//偏移量
    protected Vector3 skillPoint;//攻击点
    public bool IsRelease { get; private set; }//技能是否释放
    protected int layer;//技能对哪个一层起作用
    protected Collider[] cs;//技能碰撞体
    public event UnityAction Handle;//处理方法
    protected void Init(){
        IsRelease = true;
        layer = LayerMask.GetMask("MyPlayer") + LayerMask.GetMask("Enemy");
        prefab = LoadManager.LoadGameObject(path + skillName);
        typeWithSkill.Add(SkillType.Magic, MagicHurt);
        typeWithSkill.Add(SkillType.Physics, PhysicsHurt);
        typeWithSkill.Add(SkillType.Up, HpUp);
    }
    #region 技能
    private void MagicHurt(){
        cs = GetColliders();
        foreach (Collider c in cs){
            if (c.tag != from.tag){
                c.GetComponent<People>().BeMagicHit(attValue, from);
                c.GetComponent<People>().Anim.SetTrigger("Hurt");
            }
        }
    }
    private void PhysicsHurt(){
        cs = GetColliders();
        foreach (Collider c in cs){
            if (c.tag != from.tag){
                c.GetComponent<People>().BePhysicsHit(attValue, from);
                c.GetComponent<People>().Anim.SetTrigger("Hurt");
            }
        }
    }
    private void HpUp(){
        cs = GetColliders();
        foreach (Collider c in cs){
            if (c.tag == from.tag){
                c.GetComponent<People>().AddHp(attValue);
            }
        }
    }
    #endregion
    protected virtual Collider[] GetColliders(){
        return null;
    }
    public float GetFillTime(){
        if (IsRelease){
            return 0;
        }
        time -= Time.deltaTime;
        if (time < 0){
            IsRelease = true;
        }
        return time / skillTime;
    }
    public void SetEventHandle(UnityAction fun){
        Handle += fun;
    }
    public bool MayRelease(){
        return (from.Mp + mp >= 0) && IsRelease;
    }
    //携程函数-技能释放执行
    public virtual IEnumerator SkillPrefab(){
        IsRelease = false;
        time = skillTime;
        yield return new WaitForSeconds(delayTime);//等待延迟时间
        typeWithSkill[type]();
        from.AddMp(mp);
        skillPoint = from.transform.position + from.transform.forward * offset;
        Quaternion qua = from.transform.rotation;//施放角度
        GameObject effect = Instantiate(prefab, skillPoint, qua);
        yield return new WaitForSeconds(3);//等待三秒
        Handle?.Invoke();//时间调用
        Destroy(effect);//特效销毁
    }
}
技能基类创建完后创建技能子类StraightSkill

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class StraightSkill : SkillBase
{//直线技能
    float length;
    float width;
    public StraightSkill(People p, string _name, SkillType _type,
        float _length, float _width, int _att, int _mp, float _skillTime, float _delayTime, float _offset){
        from = p;
        length = _length;
        width = _width;
        skillName = _name;
        mp = _mp;
        type = _type;
        attValue = _att;
        skillTime = _skillTime;
        delayTime = _delayTime;
        offset = _offset;
        Init();
    }
    protected override Collider[] GetColliders(){
        skillPoint = from.transform.position + from.transform.forward * offset;
        Vector3 bound = new Vector3(width * width, length);
        return Physics.OverlapBox(skillPoint, bound, Quaternion.LookRotation(from.transform.forward), layer);
    }
}
再创建球型子类:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;

public class SphereSkill : SkillBase
{//球型技能
    float r;
    public SphereSkill(People p, string _name, SkillType _type, float _r,
        int _att, int _mp, float _skillTime, float _delayTime, float _offset){
        from = p;
        r = _r;
        skillName = _name;
        mp = _mp;
        type = _type;
        attValue = _att;
        skillTime = _skillTime;
        delayTime = _delayTime;
        offset = _offset;
        Init();
    }
    protected override Collider[] GetColliders(){
        skillPoint = from.transform.position + from.transform.forward * offset;
        return Physics.OverlapSphere(skillPoint, r, layer);
    }
}

接下来在角色类中修改代码添加技能:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.UI;
public class MyPlayer : People{
    [Header("==============子类变量==============")]
    public Transform toolPanel;//道具面板
    public Transform skillPanel;//技能面板
    //public BagPanel bag;//背包

    CharacterController contro;
    Controls action;

    float rvalue;
    float spdFast = 1;
    bool isHold;//握刀
    GameObject sword;
    GameObject swordBack;
    public Image imageHp;
    public Image imageMp;
    new void Start() {
        base.Start();
        //获取自身角色控制器
        contro = GetComponent<CharacterController>();
        SetInput();
    }
    void SetInput(){
        action = new Controls();
        action.Enable();
        action.MyCtrl.Move.started += Move;
        action.MyCtrl.Move.performed += Move;
        action.MyCtrl.Move.canceled += StopMove;
        action.MyCtrl.Jump.started += Jump;
        action.MyCtrl.Rotate.started += Rotate;
        action.MyCtrl.Rotate.performed += Rotate;
        action.MyCtrl.Fast.started += FastSpeed;
        action.MyCtrl.Fast.performed += FastSpeed;
        action.MyCtrl.Fast.canceled += FastSpeed;
        action.MyCtrl.GetTool.started += ClickNpcAndTool;
        action.MyCtrl.HoldRotate.performed += Hold;
        action.MyCtrl.HoldRotate.canceled += Hold;
        action.MyAtt.Att.started += Attack;
        action.MyAtt.SwordOut.started += SwordOut;
    }
    private void SwordOut(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        Anim.SetBool("SwordOut", !Anim.GetBool("SwordOut"));
    }
    private void Attack(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        if (EventSystem.current.IsPointerOverGameObject())
        {
            return;
        }
        if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Idle_Fight"))
        {
            Anim.SetInteger("Att", 1);
            Anim.SetTrigger("AttTrigger");

        }
        else
        {
            int num = Anim.GetInteger("Att");
            if (num == 6)
            {
                return;
            }
            if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Light_Attk_" + num))
            {
                Anim.SetInteger("Att", num + 1);
            }
        }
    }
    public void PlayerAttack(string hurt)
    {
        Collider[] cs = Physics.OverlapBox(attPoint.position, Vector3.one * 0.5f,
            attPoint.rotation, LayerMask.GetMask("Enemy"));
        if (cs.Length <= 0)
        {
            return;
        }
        int value = (int)(Att * Anim.GetInteger("Att") * 0.5f);
        foreach (Collider c in cs)
        {
            print(value);
        }
    }

    public void PlayerAttackHard(string hurt)
    {
        Collider[] cs = Physics.OverlapBox(attPoint.position, Vector3.one * 0.5f,
            attPoint.rotation, LayerMask.GetMask("Enemy"));
        if (cs.Length <= 0)
        {
            return;
        }
        int value = (int)(Att * Anim.GetInteger("Att") * 0.5f);
        foreach (Collider c in cs)
        {
            print(value);
            print("让敌人播放击倒特效");
        }
    }
    private void Hold(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        if (context.phase == InputActionPhase.Canceled)
        {
            isHold = false;
        }
        else
        {
            isHold = true;
        }
    }
    private void ClickNpcAndTool(InputAction.CallbackContext context)
    {
        //throw new NotImplementedException();
    }
    private void FastSpeed(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Run") ||
            Anim.GetCurrentAnimatorStateInfo(0).IsName("Run_Inplace"))
        {
            if (context.phase == InputActionPhase.Canceled)
            {
                spdFast = 1;
            }
            else
            {
                spdFast = 2;
            }
        }
    }
    private void Rotate(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        rvalue = context.ReadValue<float>();
    }
    private void Jump(InputAction.CallbackContext obj){
        Anim.SetTrigger("Jump");
    }

    private void StopMove(InputAction.CallbackContext context){
        Anim.SetBool("IsRun", false);
    }
    private void Move(InputAction.CallbackContext context){
        if (GameManager.gameState != GameState.Play) {
            return;
        }
        Anim.SetBool("IsRun", true);
    }
    void Ctrl()
    {
        if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Run") ||
            Anim.GetCurrentAnimatorStateInfo(0).IsName("Run_Inplace") ||
            Anim.GetCurrentAnimatorStateInfo(0).IsName("Idle")||
            Anim.GetCurrentAnimatorStateInfo(0).IsName("Idle_Fight")){
            float f = action.MyCtrl.Move.ReadValue<float>();
            contro.Move(transform.forward * f * Time.deltaTime * spdFast * Spd);
            contro.Move(transform.up * -9.8f * Time.deltaTime);
            if (isHold)
            {
                transform.Rotate(transform.up * rvalue * 0.3f);
            }
        }
    }
    void Update()
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        Ctrl();
    }
    #region 技能
    protected override void InitSkill()
    {
        SphereSkill thunderBombCut = new SphereSkill(this, "雷爆斩", SkillType.Magic, 3, Att * 10, -100, 20, 0.3f, 0);
        skills.Add(1, thunderBombCut);

        SphereSkill windCircleCut = new SphereSkill(this, "旋风斩", SkillType.Physics, 3, Att * 8, -50, 20, 0.2f, 0);
        skills.Add(2, windCircleCut);

        StraightSkill thunderLightCut = new StraightSkill(this, "雷光斩", SkillType.Physics, 7, 0.5f, Att * 7, -50, 20, 0.2f, 0);
        skills.Add(3, thunderLightCut);

        SphereSkill oneCut = new SphereSkill(this, "归一斩", SkillType.Physics, 7, Att * 7, -30, 8, 0.2f, 0);
        skills.Add(4, oneCut);

        StraightSkill crossCut = new StraightSkill(this, "十字斩", SkillType.Physics, 25, 0.5f, Att * 3, -40, 20, 0.2f, 0);
        skills.Add(5, crossCut);


        SphereSkill thunderLargeCut = new SphereSkill(this, "轰雷斩", SkillType.Magic, 7, Att * 15, -120, 25, 0.35f, 0);
        skills.Add(6, thunderLargeCut);
    }
    #endregion
}
在新输入系统中添加Skill文件包

在People基类添加基类

修改MyPlayer代码:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.UI;
public class MyPlayer : People{
    [Header("==============子类变量==============")]
    public Transform toolPanel;//道具面板
    public Transform skillPanel;//技能面板
    //public BagPanel bag;//背包

    CharacterController contro;
    Controls action;

    float rvalue;
    float spdFast = 1;
    bool isHold;//握刀
    GameObject sword;
    GameObject swordBack;
    public Image imageHp;
    public Image imageMp;
    new void Start() {
        base.Start();
        //获取自身角色控制器
        contro = GetComponent<CharacterController>();
        SetInput();
    }
    void SetInput(){
        action = new Controls();
        action.Enable();
        action.MyCtrl.Move.started += Move;
        action.MyCtrl.Move.performed += Move;
        action.MyCtrl.Move.canceled += StopMove;
        action.MyCtrl.Jump.started += Jump;
        action.MyCtrl.Rotate.started += Rotate;
        action.MyCtrl.Rotate.performed += Rotate;
        action.MyCtrl.Fast.started += FastSpeed;
        action.MyCtrl.Fast.performed += FastSpeed;
        action.MyCtrl.Fast.canceled += FastSpeed;
        action.MyCtrl.GetTool.started += ClickNpcAndTool;
        action.MyCtrl.HoldRotate.performed += Hold;
        action.MyCtrl.HoldRotate.canceled += Hold;

        action.MyAtt.Att.started += Attack;
        action.MyAtt.SwordOut.started += SwordOut;

        action.Skill.F1.started += SkillAtt;
        action.Skill.F2.started += SkillAtt;
        action.Skill.F3.started += SkillAtt;
        action.Skill.F4.started += SkillAtt;
        action.Skill.F5.started += SkillAtt;
        action.Skill.F6.started += SkillAtt;
    }

    private void SkillAtt(InputAction.CallbackContext context)
    {
        if (!Anim.GetCurrentAnimatorStateInfo(0).IsName("Idle_Fight"))
        {
            return;
        }
        string[] str = context.control.ToString().Split('/');
        int num = int.Parse(str[2][1].ToString());
        SkillBase skill = skills[num];
        if (!skill.MayRelease())
        {
            return;
        }
        Anim.SetTrigger("CSkill" + num);
        ReleaseSkill(skill);
    }

    public void SkillClick(int num)
    {
        if (!Anim.GetCurrentAnimatorStateInfo(0).IsName("Idle_Fight"))
        {
            return;
        }
        SkillBase skill = skills[num];
        if (!skill.MayRelease())
        {
            return;
        }
        Anim.SetTrigger("CSkill" + num);
        ReleaseSkill(skill);
    }

    void UpdateSkillTime()
    {
        for (int i = 0; i < skillPanel.childCount; i++)
        {
            if (skills[i + 1].IsRelease)
            {
                continue;
            }
            Image image = skillPanel.GetChild(i).GetChild(0).GetComponent<Image>();
            image.fillAmount = skills[i + 1].GetFillTime();
        }
    }

    private void SwordOut(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        Anim.SetBool("SwordOut", !Anim.GetBool("SwordOut"));
    }
    private void Attack(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        if (EventSystem.current.IsPointerOverGameObject())
        {
            return;
        }
        if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Idle_Fight"))
        {
            Anim.SetInteger("Att", 1);
            Anim.SetTrigger("AttTrigger");

        }
        else
        {
            int num = Anim.GetInteger("Att");
            if (num == 6)
            {
                return;
            }
            if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Light_Attk_" + num))
            {
                Anim.SetInteger("Att", num + 1);
            }
        }
    }
    public void PlayerAttack(string hurt)
    {
        Collider[] cs = Physics.OverlapBox(attPoint.position, Vector3.one * 0.5f,
            attPoint.rotation, LayerMask.GetMask("Enemy"));
        if (cs.Length <= 0)
        {
            return;
        }
        int value = (int)(Att * Anim.GetInteger("Att") * 0.5f);
        foreach (Collider c in cs)
        {
            print(value);
        }
    }

    public void PlayerAttackHard(string hurt)
    {
        Collider[] cs = Physics.OverlapBox(attPoint.position, Vector3.one * 0.5f,
            attPoint.rotation, LayerMask.GetMask("Enemy"));
        if (cs.Length <= 0)
        {
            return;
        }
        int value = (int)(Att * Anim.GetInteger("Att") * 0.5f);
        foreach (Collider c in cs)
        {
            print(value);
            print("让敌人播放击倒特效");
        }
    }
    private void Hold(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        if (context.phase == InputActionPhase.Canceled)
        {
            isHold = false;
        }
        else
        {
            isHold = true;
        }
    }
    private void ClickNpcAndTool(InputAction.CallbackContext context)
    {
        //throw new NotImplementedException();
    }
    private void FastSpeed(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Run") ||
            Anim.GetCurrentAnimatorStateInfo(0).IsName("Run_Inplace"))
        {
            if (context.phase == InputActionPhase.Canceled)
            {
                spdFast = 1;
            }
            else
            {
                spdFast = 2;
            }
        }
    }
    private void Rotate(InputAction.CallbackContext context)
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        rvalue = context.ReadValue<float>();
    }
    private void Jump(InputAction.CallbackContext obj){
        Anim.SetTrigger("Jump");
    }

    private void StopMove(InputAction.CallbackContext context){
        Anim.SetBool("IsRun", false);
    }
    private void Move(InputAction.CallbackContext context){
        if (GameManager.gameState != GameState.Play) {
            return;
        }
        Anim.SetBool("IsRun", true);
    }
    void Ctrl()
    {
        if (Anim.GetCurrentAnimatorStateInfo(0).IsName("Run") ||
            Anim.GetCurrentAnimatorStateInfo(0).IsName("Run_Inplace") ||
            Anim.GetCurrentAnimatorStateInfo(0).IsName("Idle")||
            Anim.GetCurrentAnimatorStateInfo(0).IsName("Idle_Fight")){
            float f = action.MyCtrl.Move.ReadValue<float>();
            contro.Move(transform.forward * f * Time.deltaTime * spdFast * Spd);
            contro.Move(transform.up * -9.8f * Time.deltaTime);
            if (isHold)
            {
                transform.Rotate(transform.up * rvalue * 0.3f);
            }
        }
    }
    void Update()
    {
        if (GameManager.gameState != GameState.Play)
        {
            return;
        }
        Ctrl();
    }
    #region 技能
    protected override void InitSkill()
    {
        SphereSkill thunderBombCut = new SphereSkill(this, "雷爆斩", SkillType.Magic, 3, Att * 10, -100, 20, 0.3f, 0);
        skills.Add(1, thunderBombCut);

        SphereSkill windCircleCut = new SphereSkill(this, "旋风斩", SkillType.Physics, 3, Att * 8, -50, 20, 0.2f, 0);
        skills.Add(2, windCircleCut);

        StraightSkill thunderLightCut = new StraightSkill(this, "雷光斩", SkillType.Physics, 7, 0.5f, Att * 7, -50, 20, 0.2f, 0);
        skills.Add(3, thunderLightCut);

        SphereSkill oneCut = new SphereSkill(this, "归一斩", SkillType.Physics, 7, Att * 7, -30, 8, 0.2f, 0);
        skills.Add(4, oneCut);

        StraightSkill crossCut = new StraightSkill(this, "十字斩", SkillType.Physics, 25, 0.5f, Att * 3, -40, 20, 0.2f, 0);
        skills.Add(5, crossCut);


        SphereSkill thunderLargeCut = new SphereSkill(this, "轰雷斩", SkillType.Magic, 7, Att * 15, -120, 25, 0.35f, 0);
        skills.Add(6, thunderLargeCut);
    }
    #endregion
}
修改MyPlayer代码:

将技能预制体包导入:

运行即可释放技能:

按E拔刀后按F1/F2/F3/F4/F5/F6键释放技能

同一个技能不能连续释放是因为冷却,

如果不同技能释放一个后另一个释放不了是因为mp不够,

设置mp初始及mp最大容量

即可释放完F1技能后还可以释放F2/F3/F4/F5/F6技能:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/196787.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

分类变量组间差异分析

1&#xff0c;频数表列联表 一维频数表 table <- table(data$low) table 0 1 130 59 prop.table(table)#百分比0 1 0.6878307 0.3121693 二维频数表 table1 <- table(data$low,data$smoke) table10 1 0 86 44 1 29 30 addmargins(table1)0 1 Sum 0…

2023.12.3 每日一题 最大点数 很巧秒的做法,数学思维的开拓

1423. 可获得的最大点数 几张卡牌 排成一行&#xff0c;每张卡牌都有一个对应的点数。点数由整数数组 cardPoints 给出。 每次行动&#xff0c;你可以从行的开头或者末尾拿一张卡牌&#xff0c;最终你必须正好拿 k 张卡牌。 你的点数就是你拿到手中的所有卡牌的点数之和。 给你…

java synchronized详解

背景 在多线程环境下同时访问共享资源会出现一些数据问题&#xff0c;此关键字就是用来保证线程安全的解决这一问题。 内存可见的问题 在了解synchronized之前先了解一下java内存模型&#xff0c;如下图&#xff1a; 线程1去主内存获取x的值读入本地内存此时x的值为1&…

React笔记

React 目录结构 入口文件 React是 React 的核心库 ReactDom是提供与 DOM 相关的功能 RegisterServiceWorker加快react的运行速度的一个js文件 ReactDom.render() 渲染页面 React创建组件 render里边放的模板 是HTML和JavaScript的结合 jsx 创建子组件 App.js 根组件文件…

3DMM模型

目录 BFMBFM_200901_MorphableModel.matexp_pca.bintopology_info.npyexp_info.npy BFM BFM_2009 01_MorphableModel.mat from scipy.io import loadmat original_BFM loadmat("01_MorphableModel.mat") # dict_keys: [__header__, __version__, __globals__, # …

视频剪辑转码:mp4批量转成wmv视频,高效转换格式

在视频编辑和处理的领域&#xff0c;转换格式是一项常见的任务。在某些编辑和发布工作中&#xff0c;可能需要使用WMV格式。提前将素材转换为WMV可以节省在编辑过程中的时间和精力。从MP4到WMV的批量转换&#xff0c;不仅能使视频素材在不同的平台和设备上得到更好的兼容性&…

LoadBalancer将服务暴露到外部实现负载均衡Openelb-layer2模式配置介绍

目录 一.openelb简介 二.主要介绍layer2模式 1.简介 2.原理 3.部署 &#xff08;1&#xff09;先在集群master上开启kube-proxy的strictARP &#xff08;2&#xff09;应用下载openelb.yaml&#xff08;需要修改镜像地址&#xff09; &#xff08;3&#xff09;编写yam…

defer 用法

目录 1、资源释放 2、异常捕获 3、参数的预计算 4、defer 返回值的陷阱 1、资源释放 下面是一个简单的读取文件的程序&#xff0c;os.Open 打开文件资源描述符&#xff0c;在读取文件后&#xff0c;需要释放资源。但是在错误的时候&#xff0c;程序就直接返回那么&#xf…

密集书库是什么意思?图书馆密集书库的书可以借出吗

密集书库是一种用于存储大量书籍和资料的高密度储存设施。它通常包括一系列钢制书架和可移动的储存架&#xff0c;使得书籍可以被紧密地排列和存储&#xff0c;以最大程度地利用存储空间。同时&#xff0c;密集书库还有各种自动化系统&#xff0c;如自动化取书系统、气候控制系…

安卓apk抓包(apk抓不到包怎么办)

起因 手机&#xff08;模拟器&#xff09;有时候抓不到apk的包&#xff0c;需要借助Postern设置一个代理&#xff0c;把模拟器的流量代理到物理机的burp上。 解决方案 使用Postern代理&#xff0c;把apk的流量代理到burp。 Postern是一个用于代理和网络流量路由的工具&#xf…

Linux coredump异常处理

什么是coredump异常调试 Linux coredump功能是当Linux下应用程序异常时,Linux内核默认的一种异常信号处理机制,内核会把异常信息与进程内存转储成coredump文件,程序员通过gdb工具可以离线分析应用程序异常时的情况。 1)配置 core 文件生成的目录,其中 %e 表示程序文件名,…

Linux Namespace技术

对应到容器技术&#xff0c;为了隔离不同类型的资源&#xff0c;Linux 内核里面实现了以下几种不同类型的 namespace。 UTS&#xff0c;对应的宏为 CLONE_NEWUTS&#xff0c;表示不同的 namespace 可以配置不同的 hostname。User&#xff0c;对应的宏为 CLONE_NEWUSER&#xf…

骨传导耳机会影响听力么?盘点骨传导耳机的好处与坏处都有哪些?

先说结论&#xff0c;使用骨传导耳机是不会影响听力的&#xff01;并且由于骨传导耳机的特殊传声原理&#xff0c;相比于传统的入耳式耳机&#xff0c;骨传导耳机拥有更多的优点&#xff0c;下面带大家了解一下骨传导耳机的优点和缺点都有哪些。 一、骨传导耳机的优点是什么&a…

kubectl获取ConfigMap导出YAML时如何忽略某些字段

前言&#xff1a; 当我们在使用Kubernetes时&#xff0c;常常需要通过kubectl命令行工具来管理资源。有时我们也想将某个资源的配置导出为YAML文件&#xff0c;这样做有助于版本控制和资源的迁移。然而&#xff0c;默认情况下&#xff0c;使用kubectl get命令导出资源配置会包…

PTA 7-224 sdut-C语言实验-排序问题

输入10个整数&#xff0c;将它们从小到大排序后输出&#xff0c;并给出现在每个元素在原来序列中的位置。 输入格式: 输入数据有一行&#xff0c;包含10个整数&#xff0c;用空格分开。 输出格式: 输出数据有两行&#xff0c;第一行为排序后的序列&#xff0c;第二行为排序…

JVM:双亲委派(未完结)

类加载 定义 一个java文件从编写代码到最终运行&#xff0c;必须要经历编译和类加载的过程&#xff0c;如下图&#xff08;图源自b站视频up主“跟着Mic学架构”&#xff09;。 编译就是把.java文件变成.class文件。类加载就是把.class文件加载到JVM内存中&#xff0c;得到一…

电子取证--windows下的volatility分析与讲解

1.volatility的安装 提示&#xff1a;我用的是2.6版本&#xff08;windows&#xff09;&#xff0c;如果直接下载的出现问题&#xff0c;用迅雷就可以解决 下载地址&#xff1a;Volatility 2.volatility的使用 1.进入终端&#xff0c;查看镜像的系统信息&#xff1a; volati…

2312skia,10构建

介绍 Skia图形库可来绘画文本,几何图形和图像: 带透视的3x3矩阵*抗锯齿,透明度,滤镜*着色器,传输模式,掩码过滤,路径特效,子像素文本 Skia的设备后端目前包括: 光栅*OpenGL*PDF*XPS*SVG*及(用来录制,然后回放到另一个Canvas中的)图片 构建 确保已先按说明下载Skia Skia用GN…

Huawei FusionSphere FusionCompte FusionManager

什么是FusionSphere FusionSphere 解决方案不独立发布软件&#xff0c;由各配套部件发布&#xff0c;请参 《FusionSphere_V100R005C10U1_版本配套表_01》。 目前我们主要讨论FusionManager和FusionCompute两个组件。 什么是FusionCompte FusionCompute是华为提供的虚拟化软…

初识动态规划算法(题目加解析)

文章目录 什么是动态规划正文力扣题第 N 个泰波那契数三步问题使用最小花费爬楼梯 总结 什么是动态规划 线性动态规划&#xff1a;是可以用一个dp表来存储内容&#xff0c;并且找到规律存储,按照规律存储。让第i个位置的值等于题目要求的答案 >dp表&#xff1a;dp表就是用一…