Example #1
0
        public void Spawn(Vector3 position, Quaternion rotation, TargetPoint target)
        {
            var oldTarget = this.target;

            this.target = target;
            try
            {
                spawner.Spawn(position, rotation);
            }
            finally
            {
                this.target = oldTarget;
            }
        }
Example #2
0
        public void CommandAttack(RosemaryUnit other)
        {
            var units = controllableUnits;

            foreach (var unit in units)
            {
                unit.CommandAttack(other);
            }

            if (units.Any())
            {
                attackCommandEffectSpawner.Spawn(
                    other.centre, Quaternion.identity,
                    TargetPoint.Transform(other.centreTransform));
            }
        }
Example #3
0
 public static TargetPoint NoneWith(TargetPoint other) => new TargetPoint(Mode.None, other);
Example #4
0
 public TargetPoint(Mode mode, TargetPoint other)
 {
     this.mode = mode;
     transform = other.transform;
     point     = other.point;
 }