コード例 #1
0
 public void Set(GameObject.BasicPropertyChangeEventType type, GameObject.BasicPropertyChangeArgs args)
 {
     ObjectId  = args.Owner.ObjectId;
     EventType = type;
     if (EventType == GameObject.BasicPropertyChangeEventType.AngularVelocity ||
         EventType == GameObject.BasicPropertyChangeEventType.LinearVelocity ||
         EventType == GameObject.BasicPropertyChangeEventType.Position ||
         EventType == GameObject.BasicPropertyChangeEventType.Size)
     {
         VectorValue = args.VectorValue;
     }
     else if (EventType == GameObject.BasicPropertyChangeEventType.Health ||
              EventType == GameObject.BasicPropertyChangeEventType.Restitution ||
              EventType == GameObject.BasicPropertyChangeEventType.Rotation)
     {
         FloatValue = args.FloatValue;
     }
     else if (EventType == GameObject.BasicPropertyChangeEventType.IsSensor ||
              EventType == GameObject.BasicPropertyChangeEventType.IsStatic)
     {
         BoolValue = args.BoolValue;
     }
 }
コード例 #2
0
 public ObjectBasicPropertyChangedAction(
     GameObject.BasicPropertyChangeEventType type, GameObject.BasicPropertyChangeArgs args)
 {
     Set(type, args);
 }