Godot 本地通知插件使用教程

Godot 本地通知插件使用教程

godot-local-notificationGodot module for local notifications (android and iOS)项目地址:https://gitcode.com/gh_mirrors/go/godot-local-notification

1. 项目的目录结构及介绍

godot-local-notification/
├── addons/
│   └── localnotification-html5/
├── android-plugin/
├── ios-framework/
├── scripts/
├── .gitignore
├── LICENSE
├── README.md
└── nativelib.json
  • addons/: 包含用于 HTML5 平台的本地通知插件。
  • android-plugin/: 包含 Android 平台的本地通知插件。
  • ios-framework/: 包含 iOS 平台的本地通知插件。
  • scripts/: 包含用于配置和启动本地通知的脚本。
  • .gitignore: Git 忽略文件。
  • LICENSE: 项目许可证文件,采用 MIT 许可证。
  • README.md: 项目说明文档。
  • nativelib.json: 本地库配置文件。

2. 项目的启动文件介绍

项目的启动文件位于 scripts/ 目录下,主要文件为 localnotification.gd。该文件用于在 Godot 项目中自动加载,以便在代码中全局使用本地通知功能。

# scripts/localnotification.gd
# 该文件包含用于显示本地通知的 API

func show(message: String, title: String, interval: float, tag: int, repeating_interval: int = 0):
    # 显示通知
    pass

func show_daily(message: String, title: String, hour: int, minute: int, tag: int = 1):
    # 每日显示通知
    pass

3. 项目的配置文件介绍

项目的配置文件为 nativelib.json,该文件用于配置本地库的相关设置。

{
    "name": "local-notification",
    "version": "0.2.2",
    "description": "Local/Push notification plugin for Godot engine",
    "author": "DrMoriarty",
    "license": "MIT"
}
  • name: 插件名称。
  • version: 插件版本。
  • description: 插件描述。
  • author: 插件作者。
  • license: 插件许可证。

通过以上配置文件和启动文件,可以方便地在 Godot 项目中集成和使用本地通知功能。

godot-local-notificationGodot module for local notifications (android and iOS)项目地址:https://gitcode.com/gh_mirrors/go/godot-local-notification

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

成旭涛Strange

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值