public static void Open(TSSItem item) { if (item.openDelay == 0 && item.openDuration == 0) { OpenImmediately(item); return; } if (item.state == ItemState.opening || item.state == ItemState.opened) { return; } item.stateChgTime = item.openDelay; item.stateChgBranchMode = false; if (item.parentChainMode && item.parent.brakeChainDelay) { item.stateChgTime = item.openDelay * (1 - item.time); } item.state = ItemState.opening; TSSBehaviour.AddItem(item); }
public static void Close(TSSItem item) { item.loopActivated = false; if (item.closeDelay == 0 && item.closeDuration == 0) { CloseImmediately(item); return; } if (item.state == ItemState.closing || item.state == ItemState.closed) { return; } item.stateChgTime = item.closeDelay; item.stateChgBranchMode = false; if (item.parentChainMode && item.parent.brakeChainDelay) { item.stateChgTime = item.closeDelay * (item.time); } item.state = ItemState.closing; TSSBehaviour.AddItem(item); }