当前位置:网站首页>[oops framework] local storage
[oops framework] local storage
2022-07-22 12:11:00 【dgflash_ game】
Functional specifications
OopsFramework- The local storage module mainly encapsulates Cocos Crator In the engine sys.localStorage Object's cross platform flat storage function , At the same time, the function of data encryption and distinguishing different accounts is added on this basis .
Instructions
Initialize local storage encryption
oops.storage.init("key", "vi");
notes : Data encryption will not be triggered in debug mode , Facilitate plaintext debugging . Publishing mode automatically starts data encryption
Initialize local storage encryption
var uid = 10000; // User unique number data
oops.storage.setUser(uid);
notes : It is used to distinguish local storage data of different accounts , Avoid the same name key The data of is overwritten by other accounts when logging in
Set the data of the specified keyword
oops.storage.set(key, value);
Get the data of the specified keyword
var data = oops.storage.get(key);
Delete the data of the specified keyword
oops.storage.remove(key);
Empty the entire local storage
oops.storage.clear();
边栏推荐
- Web3 can't escape from the Wuzhishan of these old giants no matter how powerful it is
- Part 01: distributed registry
- Composition of MySQL server process mysqld
- 30. [static data members]
- 作为测试,如何跟不讲理的开发有效沟通
- 师傅教你~LNMP源码搭建
- How does MySQL data 900w+ achieve from 17s to 300ms? Charm of SQL optimization (glory Collection Edition)
- QT: keyboard events, mouse events, timer small instances
- 传奇架设教程GOM引擎微端设置方法
- NFS服务
猜你喜欢
HCIP第十二天
JMeter test script learning (login script)
National technology n32g452 debugging interface multiplexing function JTDI jtdo jntrst
Legend setup tutorial GOM engine micro terminal setting method
001_ Getting started with kubernetes
【机器学习的数学01】可数集与不可数集
[development tutorial 5] open source Bluetooth heart rate waterproof sports Bracelet - battery power detection
Day04 禅道-从安装到卸载
How does MySQL data 900w+ achieve from 17s to 300ms? Charm of SQL optimization (glory Collection Edition)
元宇宙浪潮震撼来袭,抓住时机,齐心协力
随机推荐
[exercise C] how many steps does it take to find a number at least? It can be changed into Fibonacci number
day2 poc与exp学习之pikachu字符注入
第02篇:分布式负载均衡
An open source template that can generate a free personal blog in only three steps: vdoing template
Cadence学习之路:导入网表出错之引脚不对应
Decentralized edge rendering metauniverse protocol how cadeus detonates metaverse summit 2022
【MySQL】20-MySQL如何创建和管理表超详细汇总
[development tutorial 5] open source Bluetooth heart rate waterproof sports Bracelet - battery power detection
User identity authentication of industrial Internet based on HHT transformation of mouse behavior
From basic to advanced, 100 test and development interview questions are necessary for entering a large factory to raise salary
Oracle 创建高级连接
EN 1504-4: structural bonding of concrete structure products - CE certification
Defect report operation
JVM参数配置说明
Sentinel vs Hystrix 限流对比,该如何选择?
LeetCode:814. 二叉树剪枝【递归】
FPGA - SPI bus control flash (1) (including code)
Execution sequence of try catch finally with return
Opencv将一个文件夹下所有图片合成视频
不掌握这些坑,你敢用BigDecimal吗?