<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[JeterPong's Column]]></title><description><![CDATA[Smile to life!]]></description><link>https://blog.csdn.net/JeterPong</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; JeterPong]]></copyright><item><title><![CDATA[Unity 关于本地数据存储 的使用笔记]]></title><link>https://blog.csdn.net/JeterPong/article/details/119444984</link><guid>https://blog.csdn.net/JeterPong/article/details/119444984</guid><author>JeterPong</author><pubDate>Mon, 21 Nov 2022 19:28:02 +0800</pubDate><description><![CDATA[Unity 本地数据存储

        string json = JsonConvert.SerializeObject(app.appData.shopData.shopItemDatas, Formatting.Indented);
        PlayerPrefs.SetString("key1", json);
        PlayerPrefs.SetFloat("key2", app.appData.lastloginTime);

读取本地 数据
		strin]]></description><category></category></item><item><title><![CDATA[Unity 问题汇总：The AnimationClip ‘***‘ used by the Animation component ‘***‘ must be marked as Legacy]]></title><link>https://blog.csdn.net/JeterPong/article/details/119387807</link><guid>https://blog.csdn.net/JeterPong/article/details/119387807</guid><author>JeterPong</author><pubDate>Wed, 04 Aug 2021 16:51:49 +0800</pubDate><description><![CDATA[Unity 使用 Animation 踩坑记录
问题描述：
The AnimationClip ‘******’ used by the Animation component ‘***’ must be marked as Legacy.
新建Animation 后默认是这样的：

解决：
将动画的Normal模式改为Debug模式，然后勾选Legacy选项即可


最后，改回Normal 模式，可以看到如下：

这样就使用就不会报错了

...]]></description><category></category></item><item><title><![CDATA[Unity 秒数格式化时间显示]]></title><link>https://blog.csdn.net/JeterPong/article/details/118793361</link><guid>https://blog.csdn.net/JeterPong/article/details/118793361</guid><author>JeterPong</author><pubDate>Wed, 21 Jul 2021 14:10:08 +0800</pubDate><description><![CDATA[通过秒数 实现 时间的格式化显示成 00:00:00 格式 实现，一般用于做倒计时刷新用
代码参考：
	/**
	* 格式化时间显示
	*/
    public static string clockFormat(int time, bool isShowH = false)
    {
        if (time &lt; 0) time = 0;
        int hours = (int)Mathf.Floor(time / 3600);
        int minutes = (i]]></description><category></category></item><item><title><![CDATA[C# ASCII 码与字符之间 互转：]]></title><link>https://blog.csdn.net/JeterPong/article/details/118161543</link><guid>https://blog.csdn.net/JeterPong/article/details/118161543</guid><author>JeterPong</author><pubDate>Wed, 23 Jun 2021 20:09:39 +0800</pubDate><description><![CDATA[ASCII 码与字符 互转：
	/// &lt;summary&gt;
    /// 字符转ASCII码：
    /// &lt;/summary&gt;
    /// &lt;param name="character"&gt;&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    public static int Asc2(string character)
    {
        if (character.Length == ]]></description><category></category></item><item><title><![CDATA[根据权重返回指定随机数的某个值]]></title><link>https://blog.csdn.net/JeterPong/article/details/117381338</link><guid>https://blog.csdn.net/JeterPong/article/details/117381338</guid><author>JeterPong</author><pubDate>Sat, 29 May 2021 11:40:35 +0800</pubDate><description><![CDATA[前言
在获取随机数时，偶尔会用到 取权重值的情况，根据策划配的某个特定数组的权重值，随机获取这个特定数组的某个值。
算法实现 (ts语言)：

    /**
     * 根据 权重 返回指定随机数组 的某个值
     * @param resultArr 指定随机数组 [1,3,4,5]
     * @param weightArr 权重数组 [1,3,7,10]
     */
    public static reandomByWeight(resultArr: Array&lt;any&gt]]></description><category></category></item><item><title><![CDATA[一维数组拆分为二维数组算法实现]]></title><link>https://blog.csdn.net/JeterPong/article/details/117379773</link><guid>https://blog.csdn.net/JeterPong/article/details/117379773</guid><author>JeterPong</author><pubDate>Sat, 29 May 2021 11:06:32 +0800</pubDate><description><![CDATA[一维数组拆分为二维数组算法实现前言经验总结
前言
定义一个二维棋盘，棋盘数据由策划配好，策划把这个二维棋盘数据，用一维数组 配在JSON 文件里，前端在解析 JSON 文件时，需要把这个棋盘数据的一维数组 转换为 二维
经验总结
项目里，二维数组定义是策划在 JSON 文件数据中创建为一维数组，然后我们前端将之转换为二维数组来表现，这里写个实现 记录一下。

    /**
     * (格式化数据)将一维数组切分为二维数组
     * @param arr 需要切分的一维数组
     * @para]]></description><category></category></item><item><title><![CDATA[Egret 打包问题解决: -4058]]></title><link>https://blog.csdn.net/JeterPong/article/details/109031551</link><guid>https://blog.csdn.net/JeterPong/article/details/109031551</guid><author>JeterPong</author><pubDate>Mon, 12 Oct 2020 17:01:51 +0800</pubDate><description><![CDATA[Egret 打包问题解决: -4058

问题描述: 打包项目发内网时，显示如下报错， -4058，咋看之下，看不出什么问题，其实大多可能是 打包时，内存溢出导致。

解决:
出现这种问题一般是打包或编译项目时，npm内存溢出导致的，修改 Egret 的编译内存就可以
具体如下：
在电脑客户路径下，找到 npm 路径
C:\Users\dell\AppData\Roaming\npm\egret.cmd，
(温馨提示: 有些电脑 AppData 这个目录会隐藏，在查看 -&gt;&gt; 点击隐藏的项目就可]]></description><category></category></item><item><title><![CDATA[Egret 编译内存溢出解决方法]]></title><link>https://blog.csdn.net/JeterPong/article/details/107457239</link><guid>https://blog.csdn.net/JeterPong/article/details/107457239</guid><author>JeterPong</author><pubDate>Mon, 20 Jul 2020 10:07:18 +0800</pubDate><description><![CDATA[Egret 编译内存溢出处理办法处理
前言 使用白鹭引擎一段时间后，感觉还挺好用的，但是最近偶尔会出现 编译时 内存溢出的情况，网上找了一下原因是 node.js 版本问题导致。
处理
报错提示
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory]]></description><category></category></item><item><title><![CDATA[检测特殊字符的正则表达式]]></title><link>https://blog.csdn.net/JeterPong/article/details/107078542</link><guid>https://blog.csdn.net/JeterPong/article/details/107078542</guid><author>JeterPong</author><pubDate>Thu, 02 Jul 2020 10:18:30 +0800</pubDate><description><![CDATA[检测特殊字符 正则表达式特殊字符 
用户在取名或改名时，输入特殊字符的情况检测。]]></description><category></category></item><item><title><![CDATA[Action Script 3.0:   自适配位置]]></title><link>https://blog.csdn.net/JeterPong/article/details/82230188</link><guid>https://blog.csdn.net/JeterPong/article/details/82230188</guid><author>JeterPong</author><pubDate>Fri, 31 Aug 2018 00:24:25 +0800</pubDate><description><![CDATA[前言：

步入AS3.0 这个坑有一段时间了，跟着项目，做了一些需求，也总结了一些经验。

参考一下代码：

 


var _mTxt:TextFormat;
var _mBgBmp:Bitmap;
var _containerGSP:GSprite;
var _mBg:Bitmap;

_containerGSP = new GSprite();
_mTxt.text = &quot;Hello Wor...]]></description><category></category></item><item><title><![CDATA[ActionScript: 格式化字符串输出]]></title><link>https://blog.csdn.net/JeterPong/article/details/80871100</link><guid>https://blog.csdn.net/JeterPong/article/details/80871100</guid><author>JeterPong</author><pubDate>Sat, 30 Jun 2018 23:45:41 +0800</pubDate><description><![CDATA[前言：

刚接触 ActionScript (简称AS,非Android Studio)，目前好像是3.0版本了。

用了几天，感觉语言还是大致还是相同的，除了一些语法构建和引用外，暂时写起来感觉还能上手。今天用到字符串的拼接写法，突然发现不支持 String.Format()；的格式化输出。所以自己网上查阅了一些资料，捣鼓了一个可以 类似java的 String.Format()；写法。

 
...]]></description><category></category></item><item><title><![CDATA[Unity3D: DropdownItem 的简单使用]]></title><link>https://blog.csdn.net/JeterPong/article/details/80430626</link><guid>https://blog.csdn.net/JeterPong/article/details/80430626</guid><author>JeterPong</author><pubDate>Thu, 24 May 2018 10:58:02 +0800</pubDate><description><![CDATA[前言：DropdownItem 下拉复选框，通常用于在某个对象的多个属性选项中，选中某个特定值。如：给游戏角色的某个属性添加增值，或者游戏角色的性别属性设置里，在打开性别设置时，通常需要先获取 当前角色的性别显示，用户才能进行修改设置.(有些没有性别修改设置的则可以忽略)以下记录一下对DropdownItem 的使用笔记。//dropdownItem 的options 选项，在Unity编辑器的的...]]></description><category></category></item><item><title><![CDATA[C#: 计算 两个日期之间的 时间差]]></title><link>https://blog.csdn.net/JeterPong/article/details/80280724</link><guid>https://blog.csdn.net/JeterPong/article/details/80280724</guid><author>JeterPong</author><pubDate>Fri, 11 May 2018 14:46:55 +0800</pubDate><description><![CDATA[前言：想知道过去的某个时间到现在过了多久，经历多少天，甚至精确到分。查阅了一下资料后，自己写了一个方法实现，基本达到要求，效果杠杠哒。ヾ(๑╹◡╹)ﾉ&quot;时间的输入格式：日期(年月日)必须以逗号（，）、空格（ ）、 破折号（-）分隔开，时间(时分秒)以冒号分隔；如：string ss = &quot;2017,7,15,20:16:35&quot;;  // &quot;2017,7,15 20:16:35&quot; 、&quot;2017,7,...]]></description><category></category></item><item><title><![CDATA[Android: 渠道号获取]]></title><link>https://blog.csdn.net/JeterPong/article/details/80264199</link><guid>https://blog.csdn.net/JeterPong/article/details/80264199</guid><author>JeterPong</author><pubDate>Thu, 10 May 2018 10:50:18 +0800</pubDate><description><![CDATA[前言： 
游戏后期上线各个平台市场，需要接各自平台市场的SDK，而为了区别各个SDK，使用渠道号是个比较简单的方法。这里简单介绍下，使用方法过程。]]></description><category></category></item><item><title><![CDATA[浅析 Unity 与 Java 的相互调用]]></title><link>https://blog.csdn.net/JeterPong/article/details/80263164</link><guid>https://blog.csdn.net/JeterPong/article/details/80263164</guid><author>JeterPong</author><pubDate>Thu, 10 May 2018 10:34:19 +0800</pubDate><description><![CDATA[前言：游戏后期需要打包Android 平台包，以供上线。然后就有了涉及 Unity 与Java 之间相互调用 方法的问题。Unity 调用 Java 可有参返回，也可无参返回，这里仅简单介绍 无参返回的使用 笔记。Unity 调用 Java 方法：1.1 // 通过指定 包名的实例对象 调用java方法    AndroidJavaClass jc = new AndroidJavaClass(&quot;...]]></description><category></category></item><item><title><![CDATA[Android Studio: 包体重命名(改包名)]]></title><link>https://blog.csdn.net/JeterPong/article/details/80138387</link><guid>https://blog.csdn.net/JeterPong/article/details/80138387</guid><author>JeterPong</author><pubDate>Sat, 28 Apr 2018 18:48:59 +0800</pubDate><description><![CDATA[简析Android Studio 包体重命名

最近项目接SDK，遇到包名跟后台申请包名不一致，要重改包名的情况，摸索了一下，这里做个总结。

图文说明：

步骤： 
1.修改包名前： 


2.选中包名，右键打开–&amp;gt; Refactor –&amp;gt; Rename: 


3.输入要改的包名，确认 


4.确认重构包名 


5.检查改好的包名 


Mainfest: 


build.g...]]></description><category></category></item><item><title><![CDATA[Android error: adb 端口被占用 (adb.exe,start-server' failed -- run manually if necessary)]]></title><link>https://blog.csdn.net/JeterPong/article/details/79664840</link><guid>https://blog.csdn.net/JeterPong/article/details/79664840</guid><author>JeterPong</author><pubDate>Fri, 23 Mar 2018 11:09:54 +0800</pubDate><description><![CDATA[错误信息： 
10:28:32 adb server version (31) doesn’t match this client (39); killing… 
10:28:32 could not read ok from ADB Server 
10:28:32 * failed to start daemon 
10:28:32 error: cannot connect to daemo...]]></description><category></category></item><item><title><![CDATA[Unity3D:  导出Android 工程报错]]></title><link>https://blog.csdn.net/JeterPong/article/details/79540363</link><guid>https://blog.csdn.net/JeterPong/article/details/79540363</guid><author>JeterPong</author><pubDate>Tue, 13 Mar 2018 14:58:10 +0800</pubDate><description><![CDATA[现象在用 Unity 导出 Android 项目时，遇到 Unable to list target platforms 的问题。如图：问题关键在于，错误描述中提到的 &quot;Invalid command android&quot;, 这是AndroidSDK 中 tools 目录下的 android.bat  命令，这里报出 是个无效的命令，说明可能是这个 tools 目录下的文件出了问题。那么就好解决了。重...]]></description><category></category></item><item><title><![CDATA[C#：获取随机昵称实现]]></title><link>https://blog.csdn.net/JeterPong/article/details/79454097</link><guid>https://blog.csdn.net/JeterPong/article/details/79454097</guid><author>JeterPong</author><pubDate>Tue, 06 Mar 2018 10:02:30 +0800</pubDate><description><![CDATA[获取随机昵称实现前言：游戏中关于用户取名的问题，多数情况下，玩家默认是随机取名的(也会有自己取名的)，那这个随机昵称的获取怎么实现呢？先理一下思路~实现思路：首先，你得有一个昵称集合的数据，并把你的用户昵称集合文本放在Resource 目录下，方便加载;然后，是程序的加载读取，让它保存在一个string 中;再通过string.Split(','); 方法 分割该string 为数组。(按文本中的...]]></description><category></category></item><item><title><![CDATA[C# ：批处理文件重命名]]></title><link>https://blog.csdn.net/JeterPong/article/details/79447342</link><guid>https://blog.csdn.net/JeterPong/article/details/79447342</guid><author>JeterPong</author><pubDate>Mon, 05 Mar 2018 16:31:33 +0800</pubDate><description><![CDATA[批处理文件重命名前言：对与多个文件重命名操作，文件数量少还好，但如果文件数量超过一定数量之后，一个个手动去重命名的话，实在是繁琐了，所以写个批处理文件重命名，简单快捷又方便٩(๑❛ᴗ❛๑)۶。这里我写了个工具类，放在Unity 编辑器的菜单同居栏上，方便操作运行。如图,点击重命名文件即可自行执行.我这里是 预先 保存重命名后的文件名到列表或数组中(如果觉得脚本里面不好修改，可保存在外部文本，编译时...]]></description><category></category></item></channel></rss>