Пример #1
0
        private void Next(object s = null, GenerateEventArgs e = null)
        {
            Generator nextGen = NextGenerator();

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