// 按上键
if ( Input.GetKey( KeyCode.UpArrow ) )
{
movev -= m_speed * Time.deltaTime;
}
// 按下键
if ( Input.GetKey( KeyCode.DownArrow ) )
{
movev += m_speed * Time.deltaTime;
}
// 按左键
if ( Input.GetKey( KeyCode.LeftArrow ) )
{
moveh += m_speed * Time.deltaTime;
}
// 按右键
if ( Input.GetKey( KeyCode.RightArrow ) )
{
moveh -= m_speed * Time.deltaTime;
}
// 移动
this.m_transform.Translate( new Vector3( moveh, 0, movev ) );
这里的上键为什么对应movev的“-”操作符,下键对应movev的“+”操作符,左键对应moveh的“+”操作符,右键对应moveh的“-"操作符?