コード例 #1
0
    public override void UpdateEventHandler()
    {
        if (lastEvent != null)
        {
            target.velocity        = lastEvent.velocity;
            target.angularVelocity = lastEvent.angularVelocity;
            target.isKinematic     = lastEvent.isKinematic;
            lastEvent = null;
        }
        RigidbodyEvent newEvent = new RigidbodyEvent();

        newEvent.velocity        = target.velocity;
        newEvent.angularVelocity = target.angularVelocity;
        newEvent.isKinematic     = target.isKinematic;
        TimeController.instance.AddEvent(newEvent, this);
    }
コード例 #2
0
 public override void ApplyEvent(TimeEvent timeEvent, bool reverse)
 {
     lastEvent = (RigidbodyEvent)timeEvent;
 }