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

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