该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
string NPCname="慕容紫英\n";
private string[] mData={"为道者,当兼济天下\n不修人道,何谈仙道?","雪原出现山贼,只可惜我现在忙于除妖。\n可否请你带我走上一遭?",
"剑,当为人心而舞。\n道者,心也。","问心无愧,则可屹立世间不倒。" };
bool isTrue=false;
int timer=0;
private int index=-1;
void OnMouseDown(){
isTrue=true;
}
void OnGUI(){
if(isTrue&&timer <100){
GUI.TextArea(new Rect(5, Screen .height -80, Screen .width-10 , 75), NPCname+mData[index] , 200,bb);
}
}
void Update () {
if(isTrue){
timer ++;
}
if(timer >=100)
{
timer =0;
isTrue =false ;
}
if(Input .GetMouseButtonDown (1)||((Input.touchCount>0&&Input.GetTouch(0).phase==TouchPhase.Moved )) )
{
isTrue =false ;
takemissiontextshow=false;
}
if(Input .GetMouseButtonDown (0)&&isTrue )
{
timer=0;
if(index ==0)
{
givemission =true ;
}
if(index
{
index=index+1;
}
else
{
index=0;
}
}
}