Activates anchors only on set.
This commit is contained in:
@@ -102,6 +102,7 @@ namespace Cryville.Crtr.Event {
|
||||
}
|
||||
protected void OpenAnchor(Anchor anchor) {
|
||||
if (OpenedAnchor != null) throw new InvalidOperationException("An anchor has been opened");
|
||||
anchor.Transform.gameObject.SetActive(true);
|
||||
OpenedAnchor = anchor;
|
||||
}
|
||||
protected void CloseAnchor() {
|
||||
@@ -187,6 +188,7 @@ namespace Cryville.Crtr.Event {
|
||||
if (Alive) {
|
||||
if (!DynamicAnchorSet[_a_head]) PushAnchorEvent(cs.StampedContainer.Time, a_head, -1, true);
|
||||
if (!DynamicAnchorSet[_a_tail]) PushAnchorEvent(cs.StampedContainer.Time + cs.StampedContainer.Duration, a_tail, 1, true);
|
||||
foreach (var anchors in Anchors.Values) foreach (var anchor in anchors) anchor.Transform.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
static readonly SimpleObjectPool<StampedEvent.Anchor> anchorEvPool
|
||||
|
Reference in New Issue
Block a user