public void Compile(StormInfo info, Stack <int> scopes, int index) { try { var lastScopeBegin = scopes.Pop(); if (info.Events[lastScopeBegin] is BeginLoop beginLoopEvent) { beginLoopEvent.SetOutScopeIndex(index + 1); beginLoopIndex = lastScopeBegin; } else { throw new StormCompileException(index, GetType(), "Event at index " + lastScopeBegin + " is not a begin loop event."); } } catch (InvalidOperationException) { throw new StormCompileException(index, GetType(), "Can't find begin loop event."); } }
public void Compile(StormInfo info, Stack <int> scopes, int index) { scopes.Push(index); }
public void Compile(StormInfo info, Stack <int> scopes, int index) { bulletIndex = info.GetBulletIndex(bullet); }
/// <summary> /// Emits a storm. /// </summary> /// <param name="storm">The storm.</param> /// <param name="emitter">Bullets will be emitted relative to it.</param> public void Emit(StormInfo storm, Transform emitter) => StartCoroutine(storm.Execute(emitter));
/// <summary> /// Emits a storm from this emitter. /// </summary> /// <param name="storm">The storm.</param> public virtual void Emit(StormInfo storm) => Emit(storm, transform);