using System;
using RealmForge.Scene;
using RealmForge.SceneObjects;
using RealmForge.Scripting;
using RealmForge;
using RealmForge.Input;
namespace MMTSL.Scene{
/// <summary>
/// The RSL.Scene namespace contains scripts relating to the scene.
/// </summary>
internal class NamespaceDoc
{
}
public class PitchTarget : IScript
{
public void Execute(object invoker, object args)
{
if (RF.Player.Targets.Count > 0)
{
float pitch = 0.1f;
if (RF.Input.KeyModifiersAreDown(ControlKeys.Shift))
pitch = -0.1f;
foreach(SceneObject tgt in RF.Player.Targets)
tgt.Pitch(pitch);
}
}
}
public class YawTarget : IScript
{
public void Execute(object invoker, object args)
{
if (RF.Player.Targets.Count > 0)
{
// float yaw = 0.1f;
// if (RF.Engine.KeyModifiersAreDown(ControlKeys.Shift))
// yaw = -0.1f;
//
// RF.Player.Target.Yaw(yaw);
}
}
}
public class RollTarget : IScript
{
public void Execute(object invoker, object args)
{
if (RF.Player.Targets.Count > 0)
{
// float roll = 0.2f;
// if (RF.Engine.KeyModifiersAreDown(ControlKeys.Shift))
// roll = -0.2f;
//
// RF.Player.Target.Roll(roll);
}
}
}
public class ShowOrientation : IScript
{
public void Execute(object invoker, object args)
{
if (RF.Player.Targets.Count > 0)
{
//RF.Engine.SetGuiElementText("MMT/Overlays/InGameHUD/StatusText", String.Format("Object Orientation: {0}", RF.Player.Target.OrientationAngles.ToString()));
}
}
}
public class TargetNext : IScript
{
public void Execute(object invoker, object args)
{
/*
// select the next entity
foreach(IEntity ent in RF.Scene.Entities)
{
if (RF.Player.Targets.Count > 0)
{
RF.Player.Target = ent;
RF.Engine.SetGuiElementText("MMT/Overlays/InGameHUD/StatusText", String.Format("Entity: {0}", RF.Player.Target.ID));
break;
}
else if (RF.Player.Target.Equals(ent))
{
RF.Player.Target = null;
}
}
*/
}
}
}
|