コード例 #1
0
 public virtual void KeyDown(object sender, BoundKeyEventArgs e)
 {
     if (!_enabled || GetKeyState(e.Function))
         return; //Don't repeat keys that are already down.
     Owner.SendComponentNetworkMessage(this, NetDeliveryMethod.ReliableUnordered, e.Function, e.FunctionState);
     SetKeyState(e.Function, true);
     Owner.SendMessage(this, ComponentMessageType.BoundKeyChange, e.Function, e.FunctionState);
 }
コード例 #2
0
 public virtual void KeyUp(object sender, BoundKeyEventArgs e)
 {
     if (!_enabled)
         return;
     Owner.SendComponentNetworkMessage(this, NetDeliveryMethod.ReliableUnordered, e.Function, e.FunctionState);
     SetKeyState(e.Function, false);
     Owner.SendMessage(this, ComponentMessageType.BoundKeyChange, e.Function, e.FunctionState);
 }