public void ApplyLinks() { foreach (KeyValuePair <GameObject, Link> pair in links) { Link link = pair.Value; nclParser.AddLink(link.Description[0], link.Description[1], link.Description[2], link.Description[3]); switch (link.LinkKind) { case (LinkKind.onBeginStart): ConnectorBase.OnBeginStart(link.MediaCondition, link.MediaAction); break; case (LinkKind.onBeginStop): ConnectorBase.OnBeginStop(link.MediaCondition, link.MediaAction); break; case (LinkKind.onEndStart): ConnectorBase.OnEndStart(link.MediaCondition, link.MediaAction); break; case (LinkKind.onEndStop): ConnectorBase.OnEndStop(link.MediaCondition, link.MediaAction); break; } } }
// Use this for initialization void Start() { ConnectorBase.OnEndStop(medias[1], medias[3]); ConnectorBase.OnEndStart(medias[3], medias[0]); OnEntry(medias[1]); ConnectorBase.OnBeginStart(medias[1], medias[3]); }