当前位置:网站首页>Unity sends messages and blocks indecent words
Unity sends messages and blocks indecent words
2022-07-05 04:55:00 【yaohuiyaoo】
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Test : MonoBehaviour {
Text text;
Button btn;
InputField inout;
string temp;
void Start () {
temp = null;
text = transform.GetChild(0).GetComponent
btn = transform.GetChild(1).GetComponent();
inout = transform.GetChild(2).GetComponent();
btn.onClick.AddListener(Send);
}
string mm;
void Send()
{
string s =inout.text;
List list = new List();
list.Add(“ Bad guys ”);
list.Add(“ A fool ”);
for(int i = 0; i < list.Count; i++)
{
for (int j = 0; j< s.Length; j++)
{
temp = temp + s[j];
//print(temp);
for (int z =j+1; z < s.Length; z++)
{
temp = temp+s[z];
print(temp);
if (temp.Equals(list[i]))
{
int y = z - j;
mm= s.Replace(temp,Change(y));
break;
}
}
temp = null;
}
}
text.text = mm;
}
private string Change(int y)
{
string s = null;
for (int i = 0; i <=y; i++)
{
s = s + "*";
}
return s;
}
边栏推荐
- The first topic of ape Anthropology
- C iterator
- PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
- MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
- PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
- 用 Jmeter 工具做个小型压力测试
- Unity3d learning notes
- 49 pictures and 26 questions explain in detail what is WiFi?
- Understand encodefloatrgba and decodefloatrgba
- AutoCAD - set layer
猜你喜欢

2022 U.S. college students' mathematical modeling e problem ideas / 2022 U.S. game e problem analysis

Wan broadband access technology V EPON Technology
![[groovy] closure (closure call | closure default parameter it | code example)](/img/61/754cee9a940fd4ecd446b38c2f413d.jpg)
[groovy] closure (closure call | closure default parameter it | code example)

Number theoretic function and its summation to be updated

JVM 原理和流程简介

XSS injection

質量體系建設之路的分分合合

Establish cloth effect in 10 seconds

C4D simple cloth (version above R21)

xss注入
随机推荐
How much do you know about 3DMAX rendering skills and HDRI light sources? Dry goods sharing
#775 Div.1 B. Integral Array 数学
C iterator
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
On-off and on-off of quality system construction
Special information | finance, accounting, audit - 22.1.23
Download the details and sequence of the original data access from the ENA database in EBI
Emlog博客主题模板源码简约好看响应式
Solutions and answers for the 2021 Shenzhen cup
Use assimp library to read MTL file data
Establish cloth effect in 10 seconds
Autocad-- dynamic zoom
Detailed explanation of the ranking of the best universities
Number theoretic function and its summation to be updated
"Measuring curve length" of CAD dream drawing
Flink cluster configuration
Introduce Hamming distance and calculation examples
Create a pyGame window with a blue background
AutoCAD - stretching
Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9