随笔分类 -  游戏相关

摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// /// CloudFlow说明 /// /// 1.该脚本挂在Cloud Object上; /// 2.将 阅读全文
posted @ 2021-02-04 11:11 鸵鸟洵 阅读(372) 评论(0) 推荐(0)
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraFollow : MonoBehaviour { /// <summary> /// /// Camer 阅读全文
posted @ 2021-02-04 11:09 鸵鸟洵 阅读(779) 评论(0) 推荐(0)
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class DynamicEffect : MonoBehaviour { private SpriteRenderer spr 阅读全文
posted @ 2021-02-03 23:18 鸵鸟洵 阅读(1191) 评论(0) 推荐(0)
摘要:随机函数randN()的相互表示 1.给一个rand6() 可以等概率返回1到6,只用这个函数写出可以等概率返回1到4的函数rand4() 2.给一个rand5() 可以等概率返回1到6,只用这个函数写出可以等概率返回1到4的函数rand7() 对于随机范围大的随机函数转换为随机范围小的随机函数(问 阅读全文
posted @ 2020-10-16 00:01 鸵鸟洵 阅读(190) 评论(0) 推荐(0)
摘要:蓄水池算法 分析一下蓄水池算法在抽奖中的应用。 应用场合 考虑参加抽奖的用户基数很大且未知,也可以说是这个基数可能会动态地增加,那么在这种情况下,固定选取k个人中奖,如何保证实时参加抽奖的n个用户中每个人中奖的概率为k/n呢?(为何不在最终结果n出来时再来随机抽取k个样本,保证概率为k/n呢?其实这 阅读全文
posted @ 2020-10-10 21:33 鸵鸟洵 阅读(417) 评论(0) 推荐(0)