1 using Microsoft.Xna.Framework;
2 using Microsoft.Xna.Framework.Graphics;
4 using System.Collections.Generic;
16 internal string texture;
21 public Mount.MountData mountData {
54 mountData =
new Mount.MountData();
64 public virtual bool Autoload(ref
string name, ref
string texture, IDictionary<MountTextureType, string> extraTextures) {
65 return mod.Properties.Autoload;
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) {
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 SetMount(Player player, ref bool skipDust)
Allows you to make things happen when this mount is spawned in. Useful for player-specific initializa...
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...
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...
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...
virtual void SetDefaults()
Allows you to set the properties of this type of mount.
Mod mod
The mod which has added this ModMountData.
virtual void JumpSpeed(ref float jumpSeed, float xVelocity)
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...
This class serves as a place for you to place all your properties and hooks for each mount...
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. Called each tick the mouse is pressed.
virtual bool UpdateFrame(Player mountedPlayer, int state, Vector2 velocity)
Allows for manual updating of mount frame. Return false to stop the default frame behavior...
Mount.MountData mountData
The vanilla MountData object that is controlled by this ModMountData.
Mod is an abstract class that you will override. It serves as a central place from which the mod's co...
virtual void JumpSpeed(Player mountedPlayer, ref float jumpSeed, float xVelocity)
Allows you to modify the mount's jump speed based on its state.
ModMountData()
Constructor
virtual void JumpHeight(ref int jumpHeight, float xVelocity)