# MotionAwaiter

await handleで使用するawaiterです。完了・キャンセルのどちらでも待機が終わります。

Namespace: MeatMotion

Assembly: MeatMotion

```csharp
public readonly struct MotionAwaiter : ICriticalNotifyCompletion
```

[Runtime/Lifecycle/MotionAwaiter.cs · L10](../../source/Runtime/Lifecycle/MotionAwaiter.cs.html#L10)

## MotionAwaiter

指定したハンドルを待機対象にします。

```csharp
public MotionAwaiter(MotionHandle handle)
```

引数

- `handle` (`MotionHandle`) 操作・関連付けの対象となるハンドル。

[Runtime/Lifecycle/MotionAwaiter.cs · L13](../../source/Runtime/Lifecycle/MotionAwaiter.cs.html#L13)

## GetAwaiter

このawaiter自身を返します。

```csharp
public MotionAwaiter GetAwaiter()
```

戻り値

- 戻り値: `MotionAwaiter`

[Runtime/Lifecycle/MotionAwaiter.cs · L14](../../source/Runtime/Lifecycle/MotionAwaiter.cs.html#L14)

## IsCompleted

ハンドルが非アクティブであれば同期的に待機を終えられます。

```csharp
public bool IsCompleted { get; }
```

[Runtime/Lifecycle/MotionAwaiter.cs · L15](../../source/Runtime/Lifecycle/MotionAwaiter.cs.html#L15)

## GetResult

直接awaitの終了処理です。戻り値はありません。

```csharp
public void GetResult()
```

[Runtime/Lifecycle/MotionAwaiter.cs · L16](../../source/Runtime/Lifecycle/MotionAwaiter.cs.html#L16)

## OnCompleted

終了時に再開する継続処理を登録します。

```csharp
public void OnCompleted(Action continuation)
```

引数

- `continuation` (`Action`) 待機が終了したときに再開する処理。

[Runtime/Lifecycle/MotionAwaiter.cs · L17](../../source/Runtime/Lifecycle/MotionAwaiter.cs.html#L17)

## UnsafeOnCompleted

有効なTweenに継続処理を登録します。既に非アクティブならその場で呼び出します。

```csharp
public void UnsafeOnCompleted(Action continuation)
```

引数

- `continuation` (`Action`) 待機が終了したときに再開する処理。

[Runtime/Lifecycle/MotionAwaiter.cs · L18](../../source/Runtime/Lifecycle/MotionAwaiter.cs.html#L18)
