累计
来源:互联网 发布:隔夜茶能喝吗 知乎 编辑:程序博客网 时间:2024/04/19 12:55
<span style="color:#ff0000;">1.屏蔽敏感词</span>
void test() { string m_sentence = "我是个大坏人";// 一个句子 string m_selectWord = "坏人";// 敏感词 if (m_sentence.Contains(m_selectWord)) // 句子是否包含敏感词 { string stars = ""; for (int j = 0; j < m_selectWord.Length; j++)// 判断敏感词长度,方便代替个数 { stars += "*"; } m_sentence = m_sentence.Replace(m_selectWord, stars);// **替换敏感词 // 这里变成 string m_sentence = "我是个大**"; } }
<span style="color:#ff0000;">2.清空<span style="font-family: Arial, Helvetica, sans-serif;">Transform子集</span></span>
<pre name="code" class="csharp">public void ClearPoint(Transform point) { if (point == null) { return; } for (int i = 0; i < point.childCount; i++) { NGUITools.Destroy(point.GetChild(i).gameObject); } }
<span style="color:#ff0000;">3.替代制定字符串</span>
<pre name="code" class="csharp">
string result = "我是X女人".Replace("X", "坏");
</pre><pre name="code" class="csharp"><span style="color:#ff0000;">4.一个位置到另一个位置的位移动画</span>
<span style="color:#ff0000;"></span>
<pre name="code" class="csharp"> public UIGrid m_Grid; void PlayAnim() { iTween.ValueTo(gameObject, iTween.Hash("from", m_Grid.transform.localPosition.y, "to", m_Grid.transform.localPosition.y + m_Grid.cellHeight, "easetype", iTween.EaseType.linear, "loopType", iTween.LoopType.none, "onupdate", "onupdateTime", "time", 0.5f)); } private void onupdateTime(float value) { m_Grid.transform.localPosition = new Vector3(m_Grid.transform.localPosition.x, value, m_Grid.transform.localPosition.z); m_Grid.repositionNow = true;//刷新 }
<span style="color:#ff0000;">5.<span style="font-family: punctuation, 微软雅黑, Tohoma; font-size: 14px; line-height: 22px;">tabs监听</span></span>
UIEventListener.Get(m_tab1.gameObject).onSelect += OnTabSelect; UIEventListener.Get(m_tab2.gameObject).onSelect += OnTabSelect; void OnTabSelect(GameObject obj, bool sel) { if (sel) { if (m_tab1.gameObject == obj) { m_grid.Reposition(); } else { m_OtherGrid.Reposition(); } transform.FindChild("Scroll View").GetComponent<UIScrollView>().ResetPosition(); } }
0 0
- 累计
- 累计日产
- 数字累计
- 累计折旧
- 累计查询
- 累计直方图
- 错误累计
- 知识点累计
- 知识点累计
- ASP月累计统计
- 累计流量(西门子程序)
- 中国患者累计汇总
- ORACLE计算累计和
- ORACLE计算累计差
- android 学习知识点累计
- oracle 累计求和
- android 学习知识点累计
- 间隔日期累计
- Python-Scrapy 个人兴趣教程(三):扫尾
- 实现 MyEclipse 绿色版
- WANemv搭建网络模拟环境
- Android 4.3 隐藏功能 App Ops 分析
- 海量数据处理---simhash算法
- 累计
- platform_driver与file_operations两种方法开发led驱动
- HEVC/H.265与AVC/H.264对比总结
- 黑马程序员—OC基础--初探 “KVO”
- CentOS 7.0系统安装配置LAMP服务器(Apache+PHP+MariaDB)
- 用位运算实现两个整数的加减乘除
- java 对日期的处理
- mysql+jdk+tomcat+apache+memcache+openfire+vsftp 源码安装
- 多数据源