#####################################################################################
# Agent.cs by Jessica.kjm ,2006-11-06
#
# About the sample:
# i havent seen sammy for three days.where is he? is he lost?
# i try to find him.then i wrote this small game.
#
# KEY WORDS:IRONPYTHON1.0 PYTHON2.5 clr time AddReferenceToFile msagent
# Description:
# 1) using the clr.AddReferenceToFile :its a easy way to call component in python.
# 2) msagent.dll :its an agent server pre-installed in windows.
# Dependency:
# 1) Ironpython1.01
# 2) PYTHON 2.5:
# 3) DotNet Framework 2.0.
####################################################################################
###
### load agent and show
###
a = AgentServerClass()
cid = a.Load(".\\mnkyking.acs")[0];
c = a.GetCharacter(cid)
c.SetPosition(250,250)
c.Show(0)
time.sleep(1)
###
### define globals variable
###
for n in c.GetAnimationNames(): globals()[n] = lambda name=n: c.Play(name)
### play "Say Hello!"
Greeting()
Wave()
time.sleep(5)
### play "Say Hello!"
c.Think("where is sammy?")
time.sleep(5)