【Nibiru】Nibiru系统开发系列:Unity开发调用键值 返回确认等

本文详细介绍了在Nibiru系统开发中如何利用已封装的手柄事件接口进行快速开发,通过实现特定方法即可响应各类手柄操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在Nibiru系统开发中 手柄等事件都已经封装了,开发的时候只需要继承一下接口就好了

在开发中新建一个脚本  然后添加引用

using Nar.Internal;

 

然后在后面添加接口

INarButtonListener

选中它 点击实现接口

 public void OnFuctionKeyDown(FunctionKeyCode keyCode)
    {
        throw new System.NotImplementedException();
    }

    public void OnLiftBack()
    {
        throw new System.NotImplementedException();
    }

    public void OnLiftDown()
    {
        throw new System.NotImplementedException();
    }

    public void OnLiftFuctionKey(FunctionKeyCode keyCode)
    {
        throw new System.NotImplementedException();
    }

    public void OnLiftLeft()
    {
        throw new System.NotImplementedException();
    }

    public void OnLiftRight()
    {
        throw new System.NotImplementedException();
    }

    public void OnLiftUp()
    {
        throw new System.NotImplementedException();
    }

    public void OnPressBack()
    {
        throw new System.NotImplementedException();
    }

    public void OnPressDown()
    {
        throw new System.NotImplementedException();
    }

    public void OnPressEnter(bool isKeyUp)
    {
        throw new System.NotImplementedException();
    }

    public void OnPressLeft()
    {
        throw new System.NotImplementedException();
    }

    public void OnPressRight()
    {
        throw new System.NotImplementedException();
    }

    public void OnPressUp()
    {
        throw new System.NotImplementedException();
    }

    public void OnPressVolumnDown()
    {
        throw new System.NotImplementedException();
    }

    public void OnPressVolumnUp()
    {
        throw new System.NotImplementedException();
    }

实现接口之后就会出现这些方法  将你所需要的事件写进去就好了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值