Esempio n. 1
0
 public LazerProcess(Pattern.RuntimeParameters rParams, float width, float telegraphDuration, float attackDuration, Lazer prefab) : base(telegraphDuration + attackDuration)
 {
     runParams              = rParams;
     this.width             = width;
     this.telegraphDuration = telegraphDuration;
     this.attackDuration    = attackDuration;
     this.prefab            = prefab;
 }
Esempio n. 2
0
 public MortarProcess(Pattern.RuntimeParameters rParams, float aimTime, float radius, float seekSpeed, float lockTime, GameObject prefab) : base(aimTime + lockTime)
 {
     runParams      = rParams;
     this.aimTime   = aimTime;
     this.radius    = radius;
     this.seekSpeed = seekSpeed;
     this.lockTime  = lockTime;
     this.prefab    = prefab;
 }
Esempio n. 3
0
 public ConeProcess(Pattern.RuntimeParameters rParams, float angle, float radius, float telegraphDuration, float attackDuration, Cone prefab, GameObject telegraphEffect) : base(telegraphDuration + attackDuration)
 {
     runParams              = rParams;
     this.angle             = angle;
     this.radius            = radius;
     this.telegraphDuration = telegraphDuration;
     this.attackDuration    = attackDuration;
     this.prefab            = prefab;
 }
Esempio n. 4
0
 public SequenceProcess(List <SequenceElement> sequence, Pattern.RuntimeParameters runParams, float endDelay)
 {
     foreach (SequenceElement elem in sequence)
     {
         AddProcess(new SequenceElementProcess(elem, runParams));
     }
     if (endDelay != 0f)
     {
         AddProcess(new TimedProcess(endDelay));
     }
 }
        public SequenceElementProcess(SequenceElement seqElem, Pattern.RuntimeParameters runParams)
        {
            switch (seqElem.type)
            {
            case SequenceElementType.Bullet:
                float count = seqElem.GetField("Count").intValue;
                for (int i = 0; i < count; i++)
                {
                    AddProcess(new ShootProcess(seqElem.GetField("Projectile").projectileValue, runParams.attackPoints, seqElem.GetFloat("Speed Override")));
                    AddProcess(new TimedProcess(seqElem.GetFloat("Duration") / count));
                }
                break;

            case SequenceElementType.Lazer:
                AddProcess(new LazerProcess(runParams, seqElem.GetFloat("Width"), seqElem.GetFloat("Telegraph Duration"), seqElem.GetFloat("Duration"), seqElem.GetGameObject("Prefab").GetComponent <Lazer>()));
                break;

            case SequenceElementType.Mortar:
                AddProcess(new MortarProcess(runParams, seqElem.GetFloat("Aim Time"), seqElem.GetFloat("Radius"), seqElem.GetFloat("Seek Speed"), seqElem.GetFloat("Lock Time"), seqElem.GetGameObject("Prefab")));
                break;

            case SequenceElementType.Delay:
                AddProcess(new TimedProcess(seqElem.GetFloat("Duration")));
                break;

            case SequenceElementType.EnablePoint:
                AddProcess(new AttackPointStateProcess(runParams.attackPoints, seqElem.GetInt("Point index"), true));
                break;

            case SequenceElementType.DisablePoint:
                AddProcess(new AttackPointStateProcess(runParams.attackPoints, seqElem.GetInt("Point index"), false));
                break;

            case SequenceElementType.SetRotationAbsolute:
                AddProcess(new SetRotationAbsProcess(runParams, seqElem.GetFloat("Absolute Rotation")));
                break;

            case SequenceElementType.SetRotationSpeed:
                AddProcess(new SetRotationSpeedProcess(runParams, seqElem.GetFloat("Rotation Speed")));
                break;

            case SequenceElementType.Cone:
                AddProcess(new ConeProcess(runParams, seqElem.GetFloat("Angle"), seqElem.GetFloat("Range"), seqElem.GetFloat("Telegraph Duration"), seqElem.GetFloat("Duration"), seqElem.GetGameObject("Prefab").GetComponent <Cone>(), seqElem.GetGameObject("Telegraph Prefab")));
                break;
            }
        }
Esempio n. 6
0
 public SetRotationSpeedProcess(Pattern.RuntimeParameters runParams, float nSpeed)
 {
     this.runParams = runParams;
     this.nSpeed    = nSpeed;
 }
 public SetRotationAbsProcess(Pattern.RuntimeParameters runParams, float rot)
 {
     this.runParams = runParams;
     rotation       = rot;
 }