using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
namespace
StreetControlSystem.UI
{
public
static
class
HelpHand
{
private
static
string
[] Roles
=
{
"
Merlin
"
,
"
Robby
"
,
"
Genie
"
,
"
Peedy
"
};
private
static
string
[] Actions
=
{
"
RestPose
"
,
"
Wave
"
,
"
DontRecognize
"
,
"
Uncertain
"
,
"
Decline
"
,
"
Sad
"
,
"
StopListening
"
,
"
GetAttention
"
,
"
GetAttentionReturn
"
,
"
Blink
"
,
"
Idle3_2
"
,
"
Surprised
"
,
"
Congratulate_2
"
,
"
Reading
"
,
"
Announce
"
,
"
Read
"
,
"
ReadReturn
"
,
"
Idle2_2
"
,
"
Writing
"
,
"
Write
"
,
"
WriteReturn
"
,
"
Congratulate
"
,
"
Confused
"
,
"
Suggest
"
,
"
MoveRight
"
,
"
MoveLeft
"
,
"
Idle2_1
"
,
"
MoveUp
"
,
"
MoveDown
"
,
"
StartListening
"
,
"
WriteContinued
"
,
"
DoMagic1
"
,
"
DoMagic2
"
,
"
Idle1_1
"
,
"
LookDown
"
,
"
LookDownBlink
"
,
"
LookDownReturn
"
,
"
LookLeft
"
,
"
LookLeftBlink
"
,
"
LookLeftReturn
"
,
"
Idle1_3
"
,
"
LookRight
"
,
"
LookRightBlink
"
,
"
LookRightReturn
"
,
"
LookUp
"
,
"
LookUpBlink
"
,
"
LookUpReturn
"
,
"
Idle1_2
"
,
"
ReadContinued
"
,
"
Pleased
"
,
"
GetAttentionContinued
"
,
"
Process
"
,
"
Search
"
,
"
Think
"
,
"
Idle1_4
"
,
"
Greet
"
,
"
Idle3_1
"
,
"
GestureUp
"
,
"
GestureDown
"
,
"
GestureLeft
"
,
"
GestureRight
"
,
"
Show
"
,
"
Hide
"
,
"
Hearing_4
"
,
"
Hearing_1
"
,
"
Hearing_2
"
,
"
Hearin
"
,
"
Alert
"
,
"
Explain
"
,
"
Processing
"
,
"
Thinking
"
,
"
Searching
"
,
"
Acknowledge
"
};
public
static
void
ChangeRoles(
int
i_role)
{
MainForm.Character
=
MainForm.Singleton.axDaControl1.Characters[Roles[i_role]];
}
public
static
void
Hide()
{
MainForm.Character.Hide(
null
);
}
public
static
void
Show()
{
MainForm.Character.Show(
null
);
}
public
static
void
Speak(
string
str)
{
MainForm.Character.Speak(str,
null
);
}
public
static
void
PlayRandom()
{
Random rdm
=
new
Random(DateTime.Now.Year
+
DateTime.Now.Month
+
DateTime.Now.Day
+
DateTime.Now.Hour
+
DateTime.Now.Second
+
DateTime.Now.Minute
+
DateTime.Now.Millisecond);
int
i_rnd
=
rdm.Next()
%
Actions.Length;
MainForm.Character.Play(Actions[i_rnd]);
}
public
static
void
SpeakWithAct(
string
str)
{
Speak(str);
PlayRandom();
}
public
static
void
MoveTo(
int
x,
int
y)
{
MainForm.Character.MoveTo((
short
)x, (
short
)y,
null
);
}
public
static
void
Move(
int
x,
int
y)
{
MainForm.Character.MoveTo((
short
)(MainForm.Character.Left
+
x), (
short
)(MainForm.Character.Height
+
y),
null
);
}
}
}