Terraria ModLoader  0.10.1.5
A framework for Terraria mods
Terraria.ModLoader.MountLoader Class Reference

This serves as the central place from which mounts are stored and mount-related functions are carried out. More...

+ Collaboration diagram for Terraria.ModLoader.MountLoader:

Static Public Member Functions

static void AimAbility (Mount mount, Player player, Vector2 mousePosition)
 Allows you to make things happen when the mount ability is aiming (while charging). More...
 
static ModMountData GetMount (int type)
 Gets the ModMountData instance corresponding to the given type. Returns null if no ModMountData has the given type. More...
 
static void JumpHeight (Mount.MountData mount, ref int jumpHeight, float xVelocity)
 
static void JumpSpeed (Mount.MountData mount, ref float jumpSpeed, float xVelocity)
 
static void UseAbility (Player player, Vector2 mousePosition, bool toggleOn)
 Allows you to make things happen while the mouse is pressed while the mount is active. Called each tick the mouse is pressed. More...
 

Static Private Attributes

static int nextMount = MountID.Count
 

Detailed Description

This serves as the central place from which mounts are stored and mount-related functions are carried out.

Definition at line 11 of file MountLoader.cs.

Member Function Documentation

static void Terraria.ModLoader.MountLoader.AimAbility ( Mount  mount,
Player  player,
Vector2  mousePosition 
)
static

Allows you to make things happen when the mount ability is aiming (while charging).

Parameters
mount
player
mousePosition

Definition at line 105 of file MountLoader.cs.

105  {
106  if (IsModMountData(mount._data)) {
107  mount._data.modMountData.AimAbility(player, mousePosition);
108  }
109  }
static ModMountData Terraria.ModLoader.MountLoader.GetMount ( int  type)
static

Gets the ModMountData instance corresponding to the given type. Returns null if no ModMountData has the given type.

Parameters
typeThe type of the mount.
Returns
Null if not found, otherwise the ModMountData associated with the mount.

Definition at line 21 of file MountLoader.cs.

References Terraria.ModLoader.ModNet.AllowVanillaClients.

21  {
22  if (mountDatas.ContainsKey(type)) {
23  return mountDatas[type];
24  }
25  return null;
26  }
static void Terraria.ModLoader.MountLoader.JumpHeight ( Mount.MountData  mount,
ref int  jumpHeight,
float  xVelocity 
)
static

Definition at line 56 of file MountLoader.cs.

56  {
57  if (IsModMountData(mount)) {
58  mount.modMountData.JumpHeight(ref jumpHeight, xVelocity);
59  }
60  }
static void Terraria.ModLoader.MountLoader.JumpSpeed ( Mount.MountData  mount,
ref float  jumpSpeed,
float  xVelocity 
)
static

Definition at line 62 of file MountLoader.cs.

62  {
63  if (IsModMountData(mount)) {
64  mount.modMountData.JumpSpeed(ref jumpSpeed, xVelocity);
65  }
66  }
static void Terraria.ModLoader.MountLoader.UseAbility ( Player  player,
Vector2  mousePosition,
bool  toggleOn 
)
static

Allows you to make things happen while the mouse is pressed while the mount is active. Called each tick the mouse is pressed.

Parameters
player
mousePosition
toggleOnDoes nothing yet

Definition at line 94 of file MountLoader.cs.

94  {
95  if (IsModMountData(player.mount._data)) {
96  player.mount._data.modMountData.UseAbility(player, mousePosition, toggleOn);
97  }
98  }

Member Data Documentation

int Terraria.ModLoader.MountLoader.nextMount = MountID.Count
staticprivate

Definition at line 13 of file MountLoader.cs.