示例#1
0
 public void StopEffect(Common.Effect effect, Objects.Object performer)
 {
     if (effect == Common.Effect.None) return;
     if (performer == null) lua.ArgumentError(1, "Performer cannot be null");
     performer.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.StopEffect(ep, performer.Id, effect); } });
 }
示例#2
0
        public void PlayEffectWaveFromUnit(Common.Effect effect, Objects.Object unit, Objects.Object target)
        {
            if (effect == Common.Effect.None) return;
            if (unit == null) lua.ArgumentError(2, "Unit cannot be null");
            if (target == null) lua.ArgumentError(2, "Target cannot be null");

            unit.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.PlayEffectWaveFromUnit(ep, unit.Id, target.Id, effect); } });
        }
示例#3
0
 public void PlayEffectAtUnitWithLength(Common.Effect effect, Objects.Object unit, float length)
 {
     if (effect == Common.Effect.None) return;
     if (unit == null) lua.ArgumentError(2, "Unit cannot be null");
     unit.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.PlayEffectAtUnitWithLength(ep, unit.Id, effect, length); } });
 }
示例#4
0
 public void PlayEffectMissileToUnit(Common.Effect effect, Objects.Object performer, Objects.Object target, float speed)
 {
     if (effect == Common.Effect.None) return;
     if (performer == null) lua.ArgumentError(1, "Performer cannot be null");
     if (target == null) lua.ArgumentError(2, "Target cannot be null");
     float time = (target.Position - performer.Position).Length() / speed;
     performer.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.PlayEffectMissileToUnit(ep, performer.Id, target.Id, time, effect); } });
 }
示例#5
0
 public void PlayAnimation(String name, Objects.Object performer)
 {
     if (performer == null) lua.ArgumentError(1, "Performer cannot be null");
     performer.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.PlayAnimation(ep, performer.Id, name); } });
 }