1using Microsoft.Xna.Framework;
2using Microsoft.Xna.Framework.Graphics;
4using System.Collections.Generic;
5using Terraria.DataStructures;
16 internal string texture;
64 public virtual bool Autoload(ref
string name, ref
string texture, IDictionary<MountTextureType, string> extraTextures) {
68 internal void SetupMount(Mount.MountData
mountData) {
71 mountData.modMountData = newMountData;
72 newMountData.mod =
mod;
82 [Obsolete(
"JumpHeight now has a Player parameter.")]
83 public virtual void JumpHeight(ref
int jumpHeight,
float xVelocity) {
92 public virtual void JumpHeight(Player mountedPlayer, ref
int jumpHeight,
float xVelocity) {
95 [Obsolete(
"JumpSpeed now has a Player parameter.")]
96 public virtual void JumpSpeed(ref
float jumpSeed,
float xVelocity) {
105 public virtual void JumpSpeed(Player mountedPlayer, ref
float jumpSeed,
float xVelocity) {
122 public virtual bool UpdateFrame(Player mountedPlayer,
int state, Vector2 velocity) {
127 internal virtual bool CustomBodyFrame() {
137 public virtual void UseAbility(Player player, Vector2 mousePosition,
bool toggleOn) {
145 public virtual void AimAbility(Player player, Vector2 mousePosition) {
154 public virtual void SetMount(Player player, ref
bool skipDust) {
163 public virtual void Dismount(Player player, ref
bool skipDust) {
187 public virtual bool Draw(List<DrawData> playerDrawData,
int drawType, Player drawPlayer, ref Texture2D texture, ref Texture2D glowTexture, ref Vector2 drawPosition, ref Rectangle frame, ref Color drawColor, ref Color glowColor, ref
float rotation, ref SpriteEffects spriteEffects, ref Vector2 drawOrigin, ref
float drawScale,
float shadow) {
Mod is an abstract class that you will override. It serves as a central place from which the mod's co...
This class serves as a place for you to place all your properties and hooks for each mount....
virtual void JumpSpeed(ref float jumpSeed, float xVelocity)
virtual void Dismount(Player player, ref bool skipDust)
Allows you to make things happen when this mount is de-spawned. Useful for player-specific cleanup,...
ModMountData()
Constructor
virtual bool UpdateFrame(Player mountedPlayer, int state, Vector2 velocity)
Allows for manual updating of mount frame. Return false to stop the default frame behavior....
virtual void SetMount(Player player, ref bool skipDust)
Allows you to make things happen when this mount is spawned in. Useful for player-specific initializa...
int Type
The index of this ModMountData in the Mount.mounts array.
string Name
The name of this type of mount.
virtual void SetDefaults()
Allows you to set the properties of this type of mount.
virtual void JumpSpeed(Player mountedPlayer, ref float jumpSeed, float xVelocity)
Allows you to modify the mount's jump speed based on its state.
Mount.MountData mountData
The vanilla MountData object that is controlled by this ModMountData.
virtual bool Draw(List< DrawData > playerDrawData, int drawType, Player drawPlayer, ref Texture2D texture, ref Texture2D glowTexture, ref Vector2 drawPosition, ref Rectangle frame, ref Color drawColor, ref Color glowColor, ref float rotation, ref SpriteEffects spriteEffects, ref Vector2 drawOrigin, ref float drawScale, float shadow)
Allows for complete customization of mount drawing. This method will be called once for each supporte...
Mod mod
The mod which has added this ModMountData.
virtual void AimAbility(Player player, Vector2 mousePosition)
Allows you to make things happen when the mount ability is aiming (while charging).
virtual void JumpHeight(Player mountedPlayer, ref int jumpHeight, float xVelocity)
Allows you to modify the mount's jump height based on its state.
virtual void UpdateEffects(Player player)
Allows you to make things happen when mount is used (creating dust etc.) Can also be used for mount s...
virtual void JumpHeight(ref int jumpHeight, float xVelocity)
virtual void UseAbility(Player player, Vector2 mousePosition, bool toggleOn)
Allows you to make things happen while the mouse is pressed while the mount is active....
virtual bool Autoload(ref string name, ref string texture, IDictionary< MountTextureType, string > extraTextures)
Allows you to automatically load a mount instead of using Mod.AddMount. Return true to allow autoload...
bool Autoload
Whether or not this mod will autoload content by default. Autoloading content means you do not need t...