mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-05 20:56:26 -05:00
29 lines
808 B
C#
29 lines
808 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace UniVRM10.FastSpringBones.System
|
|
{
|
|
/// <summary>
|
|
/// 1キャラに対応するFastSpringBoneのスコープ
|
|
/// </summary>
|
|
public class FastSpringBoneScope : IDisposable
|
|
{
|
|
private readonly FastSpringBoneService _service;
|
|
private readonly FastSpringBoneBuffer _buffer;
|
|
|
|
public FastSpringBoneScope(IReadOnlyList<FastSpringBoneSpring> springs)
|
|
{
|
|
_service = FastSpringBoneService.Instance;
|
|
_buffer = new FastSpringBoneBuffer(springs);
|
|
|
|
_service.BufferCombiner.Register(_buffer);
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
_service.BufferCombiner.Unregister(_buffer);
|
|
_buffer.Dispose();
|
|
}
|
|
}
|
|
} |