当前位置:网站首页>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;
}
边栏推荐
- Establish cloth effect in 10 seconds
- [groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
- 2021-10-29
- "Measuring curve length" of CAD dream drawing
- AutoCAD -- dimension break
- #775 Div.1 B. Integral Array 数学
- 2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
- [goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens
- Wan broadband access technology V EPON Technology
- Unity3d learning notes
猜你喜欢

An article takes you to thoroughly understand descriptors

CUDA Programming atomic operation atomicadd reports error err:msb3721, return code 1

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

The principle of attention mechanism and its application in seq2seq (bahadanau attention)

【acwing】837. Number of connected block points
![[groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)](/img/36/c4206a95c007e41df628d99e06ba18.jpg)
[groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)

Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9

AutoCAD - full screen display

【acwing】240. food chain
![[PCL self study: feature9] global aligned spatial distribution (GASD) descriptor (continuously updated)](/img/2b/933586b6feff1d48c5bee11cd734ba.jpg)
[PCL self study: feature9] global aligned spatial distribution (GASD) descriptor (continuously updated)
随机推荐
Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套
AutoCAD - lengthening
AutoCAD - workspace settings
猿人学第一题
AutoCAD - Center zoom
Rip notes [rip three timers, the role of horizontal segmentation, rip automatic summary, and the role of network]
Leetcode 222 number of nodes of complete binary tree
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
【acwing】837. Number of connected block points
Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
用 Jmeter 工具做个小型压力测试
Panel panel of UI
Manually implement heap sorting -838 Heap sort
Unity synergy
Data security -- 14 -- Analysis of privacy protection governance
669. Prune binary search tree ●●
stm32Cubemx(8):RTC和RTC唤醒中断
[groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
JMeter -- distributed pressure measurement