예제 #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)
 {
 }
예제 #5
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     //generate independetly
 }
예제 #6
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     GenerateInstance();
 }
예제 #7
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     GenerateComponent.Generate(e);
 }
예제 #8
0
파일: Generator.cs 프로젝트: KLD/Hoofa
 /// <summary>
 /// Called when genrator generates. This is invoked before <see cref="OnGenerateEventHandler"/>
 /// </summary>
 protected abstract void OnGenerate(GenerateEventArgs e);
예제 #9
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     base.OnGenerate(e);
     //StartCoroutine(StareAtPlayer(WaitTime));
 }
예제 #10
0
 protected override void OnGenerate(GenerateEventArgs e)
 {
     base.OnGenerate(e);
 }