Example #1
0
        private void Next(object s = null, GenerateEventArgs e = null)
        {
            Generator nextGen = NextGenerator();

            if (nextGen == null)
            {
                HasRanOut = true;
            }
            else
            {
                SwitchIn(nextGen);
            }
        }
Example #2
0
        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;
        }
Example #4
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     GenerateInstance();
 }
Example #5
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     base.OnGenerate(e);
 }
Example #6
0
 /// <summary>
 /// Called when genrator generates. This is invoked before <see cref="OnGenerateEventHandler"/>
 /// </summary>
 protected abstract void OnGenerate(GenerateEventArgs e);
Example #7
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
 }
Example #8
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     //generate independetly
 }
Example #9
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     GenerateComponent.Generate(e);
 }