private void Next(object s = null, GenerateEventArgs e = null) { Generator nextGen = NextGenerator(); if (nextGen == null) { HasRanOut = true; } else { SwitchIn(nextGen); } }
protected override void OnGenerate(GenerateEventArgs e) { var offset = CopiedMotion.GetOffset(); //update position Vector2 prevPosition = Target.transform.position; Target.transform.position += (Vector3)offset; //update angle if (FaceDirection) { Target.gameObject.transform.eulerAngles = Vector3.forward * (PositionProvider.AngleBetween(prevPosition, Target.transform.position)); } }
protected override void OnGenerate(GenerateEventArgs e) { if (TeleportToOtherSide) { Target.transform.position = PositionProvider.OppositePosition; } TargetPosition = PositionProvider.ProvidedPosition; if (PositionProvider.ProvidedRotation.HasValue) { Target.transform.eulerAngles = Vector3.forward * PositionProvider.ProvidedRotation.Value; } Speed = Vector3.Distance(Target.transform.position, TargetPosition.Value) / WaitTime; }
protected override void OnGenerate(GenerateEventArgs e) { }
protected override void OnGenerate(GenerateEventArgs e) { //generate independetly }
protected override void OnGenerate(GenerateEventArgs e) { GenerateInstance(); }
protected override void OnGenerate(GenerateEventArgs e) { GenerateComponent.Generate(e); }
/// <summary> /// Called when genrator generates. This is invoked before <see cref="OnGenerateEventHandler"/> /// </summary> protected abstract void OnGenerate(GenerateEventArgs e);
protected override void OnGenerate(GenerateEventArgs e) { base.OnGenerate(e); //StartCoroutine(StareAtPlayer(WaitTime)); }
protected override void OnGenerate(GenerateEventArgs e) { base.OnGenerate(e); }