Windward
Action-adventure RPG available on Steam Early Access
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
GameAirShip Class Reference
Inheritance diagram for GameAirShip:
GameShip Ship Tasharen.Car Tasharen.Vehicle GameUnit TNBehaviour

Public Member Functions

override bool CanBeRepairedBy (GameUnit unit)
 Whether the unit can be repaired by the targeted unit. More...
 
- Public Member Functions inherited from GameShip
void Init ()
 Initialize the ship and attach all the expected scripts. More...
 
void UpdateFactionColors ()
 Update the unit's pennant color. More...
 
void UpdateCustomColors ()
 Update the player's colors. More...
 
override bool CanBeRepairedBy (GameUnit unit)
 Whether the unit can be repaired by the targeted unit. More...
 
override void RepairTick (GameUnit source)
 Perform a single repair tick on this unit. More...
 
override void ForceBrake ()
 Force-brake. Useful if you want the vehicle to slow down. More...
 
override void AdjustHP (float primary, float secondary=0f, GameUnit source=null, float threshold=1f)
 Adjust the unit's hit points by the specified value. More...
 
void InvalidateLoot ()
 Used to invalidate loot eligibility. More...
 
void UpdateStatsAndTalents ()
 Equip all of the player's items. More...
 
void SetStats (DataNode ship, System.Collections.Generic.List< NamedInt > bonusStats=null, int level=0)
 Convenience function that sets the ship's stats, given the ship's data and bonus stats. More...
 
float SteerTowards (Vector3 target)
 Steer the ship toward the specified target. More...
 
float SteerAndMoveTowards (Vector3 target)
 Steer the ship toward the specified target, accelerating or slowing down as necessary. More...
 
override void AddExplosionForce (float force, Vector3 pos, float forceRadius)
 Add an explosion force. More...
 
GameShip FindClosest (float maxDistance=100f)
 Find the closest ship to this one. More...
 
GameShip FindClosest (Vector3 pos, float maxDistance, GameConfig.Reaction reaction)
 Find the closest ship to this one. More...
 
- Public Member Functions inherited from Tasharen.Vehicle
void Teleport (Vector3 pos)
 Teleport the ship to the specified position. More...
 
void Teleport (Vector3 pos, Quaternion rot)
 Teleport the ship to the specified position and rotation. More...
 
void Teleport (Vector3 pos, Quaternion rot, Vector3 vel)
 Teleport the ship to the specified position, rotation and velocity. More...
 
void Teleport (Vector3 pos, Quaternion rot, Vector3 vel, Vector3 angVel)
 Teleport the ship to the specified position, rotation and velocity. More...
 
void Sync ()
 Immediately synchronize the vehicle's position, rotation and velocity. More...
 
void Explode ()
 Explode the vehicle. More...
 
void Explode (float force, float forceRadius, bool affectSelf)
 Explode the vehicle. More...
 
void AddExplosionForce (Vector3 pos, float hitRadius, float force, float forceRadius, bool affectSelf)
 Create an explosion at the specified location. More...
 
void Respawn (Vector3 pos, Quaternion rot)
 Respawn the vehicle. More...
 
- Public Member Functions inherited from GameUnit
delegate void UnitCallback (GameUnit unit)
 
bool HasBuff< T > ()
 Whether the unit has the specified buff active on it. http://issuetracker.unity3d.com/issues/excessive-garbage-generated-when-accessing-a-non-existent-component More...
 
GetBuff< T > (bool createIfMissing=false)
 Get the specified buff on the unit. Returns 'null' if the buff is not present. More...
 
void RegisterBuff (System.Type t)
 Register a buff. Should be called from Buff's OnEnable. More...
 
void UnregisterBuff (System.Type t)
 Unregister a buff. Should be called from Buff's OnDisable. More...
 
bool HasFactionNearby (int faction)
 Whether this unit has specified faction near it. More...
 
bool CanApplyDamage (GameUnit source)
 Whether we can apply damage to this unit. More...
 
void IncreaseKillCount (GameUnit kill)
 Increase the number of kills by one. More...
 
void ResetKillCount ()
 Reset the number of kills back to zero. More...
 
bool InProximityTo (GameUnit unit)
 Whether this unit is in proximity to the specified one. More...
 
void ChangeFaction (int id)
 Change the unit's faction – for example when capturing a building. More...
 
void AwardXPToEnemies (float experience, int rep=0)
 Award the specified amount of experience to enemies around the unit. More...
 
float DiluteExp (float experience)
 Helper function that dilutes the specified amount of experience based on how many friendly units are present. More...
 
Attachable Attach (System.Type type, PlayerItem item)
 Attach a new attachment component of specified type or return an existing one. More...
 
Attachable Attach (System.Type type, PlayerItem item, ref bool changed)
 Attach a new attachment component of specified type or return an existing one. More...
 
GameUnit GetNearbyUnit (Vector3 dir, float maxAngle, float maxRange=100f, GameTarget.Snapping snap=GameTarget.Snapping.All)
 Find the optimal target within the unit's proximity range. More...
 
void AddHudText (string message, Color color, float duration, bool localized=false)
 Add a new HUDText message above the unit. More...
 
int GetStat (string statName, bool includeAdjustments=true)
 Get the specified stat. More...
 
void SetStat (string statName, int value)
 Set the unit's specified base stat. Should only be used when setting NPC unit's base equipment stats. More...
 
void AdjustStat (string statName, int value)
 Adjust the specified stat. Should be used by buffs. More...
 
void AdjustBaseStat (string statName, int value)
 Adjust the specified base stat. Should only be used when setting NPC unit's base equipment stats. More...
 
float GetTalentValue (string talentName, string fieldName)
 Convenience function that returns the unit's talent value for the specified talent. More...
 
float GetTalentStrength (string talentName)
 Convenience function that returns the unit's talent strength value for the specified talent. More...
 
bool GetTalentData (string talentName, out float strength, out float duration)
 Get the strength and duration associated with the specified talent. More...
 
void AddBuff (string buffName, float duration)
 Add a new buff of specified type. Only use this function if this is a long-term buff. Don't use it for short-term effects, like auras. More...
 
void AddBuff (string buffName, float strength, float duration)
 Add a new buff of specified type. Only use this function if this is a long-term buff. Don't use it for short-term effects, like auras. More...
 
void RemoveAllBuffs ()
 Remove the unit's buffs. More...
 
void SetSkillCooldown (string skillName, float cooldown)
 Place the specified skill on a cooldown timer. More...
 
float GetSkillCooldown (string skillName)
 Get the unit's remaining cooldown timer for the specified skill. This value is relative (0 to 1 range), where 1 means 100% remaining, and 0 means it's ready to be used again. More...
 
- Public Member Functions inherited from TNBehaviour
virtual void DestroySelf ()
 Destroy this game object. More...
 

Public Attributes

Transform offset
 Used to move the ship's renderers and colliders downwards when flying, in effect shifting the point around which it turns. More...
 
GameObject extraExplosion
 Explosion prefab used when the hull hits something below. More...
 
float forwardForce = 3f
 Used to drive the ship forward. More...
 
float turnRate = 1f
 How quickly the vehicle is able to turn. More...
 
float turnRatePenalty = 0.75f
 Lower speed penalizes the turn rate down to this percentage. More...
 
float forwardTilt = 1f
 How much the ship will tilt when moving forward or back. More...
 
float sidewaysTilt = 1f
 How much the ship will tilt when moving left or right. More...
 
- Public Attributes inherited from GameShip
AnimationCurve windEffectCurve
 Effectiveness sails have on vehicle's movement. More...
 
GameObject[] collidersToDisable
 List of objects to disable when the ship explodes. More...
 
Animation deathAnimation
 Animation that plays when the ship gets destroyed. More...
 
GameObject sinkingEffect
 Effect created at the ship's location when it begins to sink. More...
 
float rammingSize = 1f
 Ship's size for ramming purposes. More...
 
float clearance = -0.5f
 Depth required in order for this ship to pass. More...
 
float turning = 1f
 Turning speed multiplier. For fine-tuning ships. More...
 
float radius = 1.5f
 Ship's radius is used to calculate AoE damage. More...
 
PFObstacle obstacle
 Obstacle used to block nodes as the ship moves. More...
 
Color hullColor0 = new Color32(97, 67, 47, 255)
 
Color hullColor1 = new Color32(255, 178, 107, 255)
 
Color sailColor0 = Color.white
 
Color sailColor1 = new Color(0.5f, 0f, 0f)
 
Color pennantColor0 = new Color(1f, 0f, 0f)
 
Color pennantColor1 = new Color(0.35f, 0f, 0f)
 
Color pennantColor2 = Color.white
 
Color nameColor0 = Color.white
 
Color nameColor1 = Color.black
 
string symbolTex = "Lion"
 
string pennantTex = "Triangle"
 
float lastDockedTime = 0f
 
Vector3 collisionPoint
 Point of collision. Only valid if 'isReefed' is true. More...
 
Vector3 collisionDirection
 
- Public Attributes inherited from Ship
float windTiltStrength = 1f
 How much the wind affects the ship's center of mass. More...
 
GameTown dockedTown
 
- Public Attributes inherited from Tasharen.Car
float engineTorque = 2000f
 Maximum torque applied to the wheels when accelerating. NOTE: The more the wheels weight, the more torque they need to get going. More...
 
float brakeTorque = 1000f
 Torque applied to the wheels when slowing down. NOTE: The more the wheels weight, the more torque they need to stop. More...
 
AnimationCurve torqueCurve
 Provide more torque at rest, and less torque when moving at full speed. More...
 
AnimationCurve turnCurve
 Higher movement speed has the ability to penalize the turning rate in order to prevent rolling over. More...
 
float maxRPM = 200f
 Engine's maximum rotations per minute. NOTE: Larger wheels allow for less RPM needed in order to move at the same speed. More...
 
Brake brakeType = Brake.Manual
 Brake type on the vehicle. More...
 
- Public Attributes inherited from Tasharen.Vehicle
const float fullInterval = 3f
 How frequently the vehicle will synchronize its position, rotation and velocity, in seconds. More...
 
Transform centerOfMass
 Center of mass, applied to the rigidbody after the wheels get added. More...
 
GameObject explosionPrefab
 Prefab instantiated when the vehicle gets destroyed. More...
 
AudioSource engineSound
 Audio source that's supposed to be playing the engine sound. More...
 
Vector2 pitchRange = new Vector2(0.75f, 1.25f)
 How much pitch his allowed to change as the engine revvs up. More...
 
ParticleSystem[] dustEmitters
 Particle system for dust trails. More...
 
GameObject[] disableOnExplosion
 Children to deactivate when the vehicle explodes. More...
 
AnimationCurve velocityDragCurve
 Rigidbody's drag can be adjusted by this curve, based on the direction of travel. 0 = forward, 0.5 = sideways, 1 = reverse. More...
 
float destroyedVelDrag = 1f
 Penalty applied to drag when the vehicle has been destroyed. More...
 
float destroyedAngDrag = 1f
 Penalty applied to angular drag when the vehicle has been destroyed. More...
 
- Public Attributes inherited from GameUnit
GamePlayer player
 Player that's currently controlling the unit. Should be set at the time of instantiation. More...
 
int factionID = 0
 ID of the faction this unit belongs to. More...
 
Transform aimTarget
 Target that will be used for aiming. More...
 
ParticleSystem hitEffect
 Particles to emit when hit by cannonballs. More...
 
System.Collections.Generic.List
< NamedInt
stats = new System.Collections.Generic.List<NamedInt>()
 Unit's full stats. More...
 
System.Collections.Generic.List
< NamedInt
baseStats = new System.Collections.Generic.List<NamedInt>()
 
System.Collections.Generic.List
< NamedInt
buffStats = new System.Collections.Generic.List<NamedInt>()
 
float health = 1f
 The current condition of the hull in 0 to 1 range. More...
 
float secondaryHealth = 1f
 The current condition of the sails for ships or construction for buildings in 0 to 1 range. More...
 
HUDText hud
 Unit's associated HUD. Assigned via the UICreateHud script. More...
 

Protected Member Functions

void SetFlying (bool val)
 
override void FixedUpdate ()
 Keep the ship up in the air as needed. More...
 
override void OnUpdate ()
 Disable emitters unless close to the water. More...
 
override void OnCreateExplosion ()
 Explosions differ whether it's in the air or not. More...
 
override void PlayDeathAnimation (bool eligibleForItems)
 Play the appropriate death animation. More...
 
override void OnCollisionEnter (Collision col)
 Explode the hull when it hits something. More...
 
void ExtraExplosion ()
 Extra explosion happens when the ship's hull hits the ground. More...
 
override void SyncNow ()
 Immediately synchronize the ship's position, rotation and velocity. More...
 
void OnSyncShip (Vector3 pos, float angle, Vector3 vel, bool br)
 
- Protected Member Functions inherited from GameShip
override void Awake ()
 Cache everything. More...
 
override void OnEnable ()
 
override void OnDisable ()
 
override void OnStart ()
 Initialize the ship if it hasn't been already. More...
 
void OnSpawnHelp (int factionID, byte count)
 
override void OnFactionChanged ()
 Change the pennant and name colors. More...
 
override void UpdateMoveAxes ()
 Only update the movement axes if the screen is visible. More...
 
override void UpdateWheelEmitters ()
 Update emitters associated with the ship's wheels. More...
 
override void UpdateEmitters (bool enable, float alpha)
 Update all dust particle emitters. More...
 
override void UpdateEngineSound ()
 Update the sailing sound. More...
 
override void OnFixedUpdate ()
 Prevent the ship from going below the water line (avoids bugs). More...
 
void TravelCheck ()
 Exiting the region's bounds should let the player travel to the next one. More...
 
override void SyncNow ()
 Immediately synchronize the ship's position, rotation and velocity. More...
 
void OnSyncShip (float x, float z, float angle, Vector3 vel, bool br)
 
void OnTriggerEnter (Collider col)
 Sail damage comes in the form of cannonballs hitting the Sail Triggers. More...
 
void OnCollisionExit (Collision col)
 Remember when the ship gets reefed. More...
 
override void FixedUpdate ()
 Move the ship. More...
 
void OnInval ()
 
override void ShowDamage (float primary, float secondary)
 How the damage done to the ship. More...
 
override void PlaceInCombat ()
 Place the unit in combat after taking damage, but don't do it from being reefed. More...
 
override void OnAdjustHP (float primary, float secondary)
 Adjust the unit's hit points. More...
 
override void OnKillNotification ()
 Inform the AI. More...
 
override void OnDeath (Vehicle v)
 Play the death animation and queue other actions. More...
 
IEnumerator DelayedDrop (PlayerItem item, float delay)
 Drop the specified item after a delay has passed. More...
 
override void OnCreateExplosion ()
 Create an explosion at the ship's location. More...
 
void DamageNearbyShips (Vector3 myPos)
 Damage nearby ships and disable objects. More...
 
void DisableObjectsOnExplosion ()
 Disable objects that should be disabled on explosion. More...
 
IEnumerator DelayedSplash ()
 Create a big water splash off the side of the ship. More...
 
IEnumerator DelayedDisable ()
 Disable the colliders, letting other ships to pass through this one. More...
 
IEnumerator DelayedLoot (bool eligibleForItems)
 Create loot where the ship was destroyed. More...
 
IEnumerator DelayedDestroy ()
 Destroy the object after the animation finishes. More...
 
override void OnRespawn (Vehicle v)
 The ships are re-created. They don't respawn due to bugs with Unity's cloth. More...
 
override void TurnInPlace (float turn)
 Turn the vehicle in place by the specified amount. More...
 
- Protected Member Functions inherited from Ship
override void OnStart ()
 Called when the vehicle is starting up. More...
 
void SetTO (float v0, float v1)
 
void AdvanceTime (float delta)
 
override void FixedUpdate ()
 Update the physics and adjust the rigidbody's drag value. More...
 
- Protected Member Functions inherited from Tasharen.Car
override void OnStart ()
 Create the wheels and adjust the center of mass. More...
 
override void OnUpdate ()
 Update the engine sound based on how fast the tank is moving. More...
 
override void UpdateMoveAxes ()
 React to brake being pressed. More...
 
override void OnFixedUpdate ()
 Drive the car using physics. More...
 
void CommonFixedUpdate ()
 Drive the car using physics. More...
 
- Protected Member Functions inherited from Tasharen.Vehicle
void Start ()
 Start the script and set the center of mass. More...
 
override void Update ()
 Update the movement values. More...
 
void OnSetAxis (Vector2 left, Vector2 right, bool br)
 
void SetState (Vector3 pos, Quaternion rot, bool activeState)
 Kill the vehicle, optionally exploding it for the fun of it! More...
 
virtual bool IsClose (Vector3 pos)
 Whether the specified position is close enough to not have to do a full teleport. More...
 
void MoveLocal (Vector3 pos)
 Immediately move the vehicle to the specified position. More...
 
void MoveLocal (Vector3 pos, Quaternion rot)
 Immediately move the vehicle to the specified position and rotation. More...
 
void MoveLocal (Vector3 pos, Quaternion rot, Vector3 vel)
 Immediately move the vehicle to the specified position, rotation and velocity. More...
 
void MoveLocal (Vector3 pos, Quaternion rot, Vector3 vel, Vector3 angVel)
 Immediately move the vehicle to the specified position, rotation and velocity. More...
 
void OnSyncVehicle (Vector3 pos, Quaternion rot, Vector3 vel, Vector3 angVel)
 
void CreateExplosion ()
 
- Protected Member Functions inherited from GameUnit
void SetDisc (bool val)
 
void DiscoveryXP ()
 
virtual void OnDiscover ()
 What to do when the unit gets discovered by the player for the first time. More...
 
virtual void OnDiscovered ()
 Any and all actions to perform when discovered. More...
 
void OnKillMsg (string victor, string victim)
 
void OnKill (bool victimWasAPlayer)
 
void OnClearKills ()
 
void OnKillCount (int val)
 
virtual void OnFaction (int id)
 Remote function call triggered when the faction changes. More...
 
virtual void AwardXP ()
 Called when the unit dies. Should award experience to everyone around this unit. More...
 
void AdjustRFC (float primary, float secondary, uint srcID, float threshold)
 
void OnSetHP (float a, float b)
 
void OnHT (string msg, Color col, float dur, bool loc)
 
void OnAddBuff (string buffName, float strength, float duration)
 
void SetBuffs (List< BuffEntry > buffs)
 
void OnRMB1 ()
 
void OnRMB2 ()
 
void SetFac0 ()
 
void SetFac1 ()
 
void SetFac2 ()
 
void SetFac3 ()
 
void SetFac4 ()
 
void OnSetCD (string skillName, float cooldown)
 

Properties

bool isFlying [get, set]
 Air ship can rise up in to the air. More...
 
bool canLand [get]
 Whether we can land here. More...
 
override float effectiveClearance [get]
 Clearance the ship requires in order to pass. More...
 
float hoveringHeight [get]
 0 = in the water, 1 = 100% up in the air. More...
 
override float sightRange [get]
 How close the units have to be before they enter this unit's range of sight. More...
 
override float maximumSpeed [get]
 Ship must be up in the air for the full speed bonus. More...
 
override float activeBrakeTorque [get]
 There is far less friction up in the air. More...
 
- Properties inherited from GameShip
virtual float effectiveClearance [get]
 Clearance the ship requires in order to pass. More...
 
override string unitType [get]
 Unit type. More...
 
override string mapIcon [get]
 Unit's icon when it shows up on the map. More...
 
int maxSailHealth [get]
 Ship's maximum sail health. More...
 
override Visibility mapVisibility [get]
 Whether the unit will show up on the map. More...
 
bool isReefed [get]
 Whether the ship is currently reefed. More...
 
float lastReefedTime [get]
 Last time the ship was reefed. More...
 
float angle [get]
 The angle the ship is facing in (in degrees). More...
 
bool isCameraTarget [get]
 Whether this ship is currently being followed. More...
 
override float activeBrakeTorque [get]
 Water effectively provides a good amount of auto-braking force, but the force should be stronger if the brake button is held. More...
 
override float maximumSpeed [get]
 Maximum possible horizontal velocity. Used by the Velocity Drag Curve. More...
 
override float steeringWheelAngle [get]
 Effective wheel turning angle. More...
 
override float stationaryTurning [get]
 How quickly the ship can rotate while standing still. More...
 
override bool freezeWheelRotationInReverse [get]
 This is mainly a feature for ships. More...
 
override bool flipTurningInReverse [get]
 We don't want to flip the turning in reverse for ships. More...
 
override bool isBoss [get]
 Whether this ship is a boss. More...
 
override float aggroFactor [get]
 Aggro range depends on the specialization. More...
 
override float effectiveEnginePower [get]
 Power of the engine, 1 being full forward, 0 being idle, and -1 being full reverse. Affected by the condition of the ship's sails. More...
 
override float effectiveSteerPower [get]
 Desired steering power, -1 being left and 1 being right. Affected by the condition of the ship's hull. More...
 
float maximumEffectiveSpeed [get]
 Effective maximum speed taking everything into consideration. More...
 
override float relativeSpeed [get]
 Maximum speed should be affected by the wind. Shaped like a pow(3) curve to provide extra torque at lower speed. More...
 
override bool isActive [get]
 Whether the vehicle is currently active or has been destroyed. More...
 
override bool canBeAttacked [get]
 Quest units can only be attacked if there is a player close. More...
 
- Properties inherited from Tasharen.Car
bool isGrounded [get]
 Whether the vehicle is currently considered to be touching the ground. More...
 
override bool brake [get, set]
 Set the car's brake to be active or not. More...
 
virtual float steeringWheelAngle [get]
 Maximum turning angle in degrees, used for wheels. More...
 
virtual float stationaryTurning [get]
 If you are creating a tank, it's often better to have it turn in place rather than by driving. You can achieve this by setting this value to something other than zero. This value is in degrees per second. More...
 
virtual bool freezeWheelRotationInReverse [get]
 This is mainly a feature for ships. More...
 
virtual bool flipTurningInReverse [get]
 For cars it's generally a good idea to flip the turning axis when driving in reverse. More...
 
virtual float activeBrakeTorque [get]
 If custom or variable amount of brake torque is required, override this function. More...
 
virtual float brakeMagnitude [get]
 Car's active brake magnitude. Override if you're using Custom type braking. More...
 
- Properties inherited from Tasharen.Vehicle
virtual float maximumSpeed [get]
 Maximum possible horizontal velocity. Used by the Velocity Drag Curve. More...
 
virtual float relativeSpeed [get]
 Maximum velocity the vehicle can travel at after all modifications get taken into account, relative to maximum velocity. More...
 
bool playerControlled [get]
 Whether the vehicle is player-controlled or not. More...
 
Vector3 forward [get]
 Forward direction. More...
 
Vector3 flatForward [get]
 Flat forward direction, not including the Y. More...
 
Vector2 moveAxis [get]
 Current movement axis. More...
 
Vector2 tiltAxis [get]
 Current tilting axis. More...
 
override bool isActive [get]
 Whether the vehicle is currently active or has been destroyed. More...
 
float baseEnginePower [get, set]
 Desired power of the engine, 1 being full forward, 0 being idle, and -1 being full reverse. More...
 
float baseSteerPower [get, set]
 Desired steering power, -1 being left and 1 being right. More...
 
virtual float effectiveEnginePower [get]
 Engine power mitigated by factors such as engine damage. More...
 
virtual float effectiveSteerPower [get]
 Steering power mitigated by factors such as wheel damage. More...
 
float relativeMovementSpeed [get]
 Vehicle's movement speed. -1 means full speed in reverse, 1 means full speed ahead. More...
 
Vector3 movementVelocity [get]
 Ship's movement velocity. More...
 
float currentSpeed [get]
 Calculated velocity relative to the forward vector. More...
 
virtual bool brake [get, set]
 Whether the vehicle is currently braking. More...
 
- Properties inherited from GameUnit
bool discoveredByPlayer [get, set]
 Whether this unit has been discovered by the player. More...
 
float critChance [get]
 Unit's chance to crit in 0 to 1 range, with 1 being 100%. More...
 
bool doCrit [get]
 Convenience property that will return 'true' on a critical chance. More...
 
int id [get]
 Unit's unique identifier. More...
 
virtual bool isBoss [get]
 Whether this unit is a boss. More...
 
Vector3 position [get]
 Unit's world position. More...
 
Vector3 aimPosition [get]
 The position others should be aiming at. More...
 
virtual Vector3 proximityCenter [get]
 Unit's proximity center – actual position used for proximity-based checks. More...
 
virtual bool isActive [get]
 Whether the game unit is actually active. More...
 
virtual bool canBeAttacked [get]
 Whether the unit can be attacked. If not, it won't be considered as a hostile unit. More...
 
int maxHealth [get]
 Unit's maximum health. More...
 
abstract string mapIcon [get]
 Unit's icon when it shows up on the map. More...
 
abstract Visibility mapVisibility [get]
 Whether the unit will show up on the map. More...
 
bool isQuestUnit [get]
 Is this a quest unit? More...
 
bool isPlayerClose [get]
 Whether there is a player nearby. More...
 
bool isMyQuestUnit [get]
 Unit is a quest unit and the quest belongs to MyPlayer. More...
 
bool isVisibleOnTheMap [get]
 Whether the unit should be visible on the map. More...
 
abstract string unitType [get]
 Human-readable type, such as "Town" or "Ship". More...
 
virtual float sightRange [get]
 How close the units have to be before they enter this unit's range of sight. More...
 
virtual float aggroFactor [get]
 Aggro range determines how soon the unit gets placed on other units' proximity ranges. By default it's 100%. More...
 
bool isInCombat [get, set]
 Whether this unit sees nearby enemy units or not. More...
 
bool enemiesNearby [get]
 Whether there are any enemies nearby. Note that this doesn't mean that the unit is in combat. There may be hidden units nearby. More...
 
bool friendsNearby [get]
 Whether there are any friendly units nearby. More...
 
float soloBalanceOfPower [get]
 Unit's base power value based on what it is and its victory rep. More...
 
float alliedBalanceOfPower [get]
 Unit's balance of power is calculated based on the proximity of other units in the area – both friendly and hostile. More...
 
float globalCooldown [get, set]
 Global cooldown affects all skills at once, WoW style. More...
 
Collider[] colliders [get]
 Convenience function that returns the unit's cached list of colliders. More...
 
List< GameUnitsightRangeList [get]
 This unit's sight list containing all other units within sight range. More...
 
List< GameUnitweaponsRangeList [get]
 This unit's proximity list containing all other units within weapons range. More...
 
bool canRepairSelf [get]
 Whether the unit can repair itself. More...
 
bool hasTrueSight [get]
 Whether the unit can see hidden objects. More...
 
virtual float experienceValue [get]
 Unit's experience worth. More...
 
int killCount [get, set]
 Kill count, represented in stars next to the player's name on the unit's HUD. More...
 
- Properties inherited from TNBehaviour
TNObject tno [get]
 

Additional Inherited Members

- Public Types inherited from Tasharen.Car
enum  Brake { Brake.Manual, Brake.Automatic, Brake.Custom }
 
- Public Types inherited from GameUnit
enum  Visibility { Visibility.Never, Visibility.OnceVisited, Visibility.LineOfSight, Visibility.Landmark }
 
- Static Public Member Functions inherited from GameShip
static void Create (GamePlayer player, Vector3 pos, float angle)
 Create a player ship. Must be called by the player that will control it. More...
 
static string ChooseRandomShip (int level)
 Given a desired level, choose a random ship. More...
 
static void CreateRandom (string shipName, Vector3 pos, float angle, int faction=0, int extraChallenge=0, float hp=1f, float damage=1f, int boss=0)
 Create a new ship for the specified faction.. More...
 
static void Create (string shipName, string shipType, int factionID, Vector3 pos, float angle, int level, float hp=1f, float damage=1f, int boss=0)
 Create a new AI-controlled ship. More...
 
static void Create (string shipName, DataNode ship, int factionID, Vector3 pos, float angle, int level, float hp=1f, float damage=1f, int boss=0)
 Create a new AI-controlled ship. More...
 
static void Create (string shipName, string shipType, int factionID, Vector3 pos, float angle, int level, System.Collections.Generic.List< NamedInt > stats, float hp=1f, float damage=1f)
 Create a new NPC ship. More...
 
static void Create (string shipName, DataNode ship, int factionID, Vector3 pos, float angle, int level, System.Collections.Generic.List< NamedInt > stats, float hp=1f, float damage=1f)
 Create a new NPC ship. More...
 
- Static Public Member Functions inherited from Tasharen.Vehicle
static T FindInParents< T > (GameObject go)
 Finds the specified component on the game object or one of its parents. More...
 
- Static Public Member Functions inherited from GameUnit
static GameUnit Find (int id)
 Find a unit by its ID. More...
 
static GameUnit Find (uint id)
 Find a unit by its ID. More...
 
static GameUnit Find (string name)
 Find a unit by name. More...
 
- Static Public Attributes inherited from GameShip
static new List< GameShiplist = new List<GameShip>()
 List of all the game units currently present in the scene. More...
 
- Static Public Attributes inherited from GameUnit
static List< GameUnitlist = new List<GameUnit>()
 List of all the game units currently present in the scene. More...
 
static UnitCallback onKill
 Notification triggered when any unit dies. More...
 
static UnitCallback onFactionChanged
 Notification triggered when the unit's faction changes. More...
 
- Static Protected Member Functions inherited from GameShip
static GameObject OnCreateShip (GameObject go, Vector3 pos, float angle)
 
- Protected Attributes inherited from GameShip
bool mIsPlayingAnim = false
 
DataNode mFactionData
 
bool mReefed = false
 
int mCollisions = 0
 
float mWindCurveMin = -1f
 
int mRepairWood = 0
 
bool mInitDone = false
 
bool mEligibleForLoot = false
 
- Protected Attributes inherited from Ship
Vector3 mCenter
 
float mTime0 = 0f
 
float mTime1 = 0f
 
- Protected Attributes inherited from Tasharen.Car
CarWheel[] mWheels
 
float mWheelSpeed = 0f
 
float mLastGround = 0f
 
bool mIsGrounded = false
 
float mPitch = 0f
 
float mAlpha = 0f
 
bool mBrake = false
 
bool mForward = true
 
float mMaxVolume = 1f
 
float mBrakeRelease = 0f
 
- Protected Attributes inherited from Tasharen.Vehicle
bool mIsActive = true
 
Color[] mEmitterColors
 
Transform mTrans
 
Rigidbody mRb
 
Vector2 mMove = Vector2.zero
 
Vector2 mTilt = Vector2.zero
 
float mNextSync = 0f
 
- Protected Attributes inherited from GameUnit
bool mDiscovered = false
 
List< GameUnitmWeaponRange = new List<GameUnit>()
 
List< GameUnitmSightRange = new List<GameUnit>()
 
float mProximityUpdate = 0f
 
bool mIsInCombat = false
 
bool mFriendsNearby = false
 
bool mEnemiesNearby = false
 
int mKillCount = 0
 
float mGlobalCooldown = 0f
 
Collider[] mCols
 
- Static Protected Attributes inherited from GameShip
static int terrainLayer = -1
 

Member Function Documentation

override bool GameAirShip.CanBeRepairedBy ( GameUnit  unit)
virtual

Whether the unit can be repaired by the targeted unit.

Reimplemented from GameUnit.

void GameAirShip.ExtraExplosion ( )
protected

Extra explosion happens when the ship's hull hits the ground.

override void GameAirShip.FixedUpdate ( )
protectedvirtual

Keep the ship up in the air as needed.

Reimplemented from Tasharen.Vehicle.

override void GameAirShip.OnCollisionEnter ( Collision  col)
protectedvirtual

Explode the hull when it hits something.

Reimplemented from GameShip.

override void GameAirShip.OnCreateExplosion ( )
protectedvirtual

Explosions differ whether it's in the air or not.

Reimplemented from Tasharen.Vehicle.

void GameAirShip.OnSyncShip ( Vector3  pos,
float  angle,
Vector3  vel,
bool  br 
)
protected
override void GameAirShip.OnUpdate ( )
protectedvirtual

Disable emitters unless close to the water.

Reimplemented from Tasharen.Vehicle.

override void GameAirShip.PlayDeathAnimation ( bool  eligibleForItems)
protectedvirtual

Play the appropriate death animation.

Reimplemented from GameShip.

void GameAirShip.SetFlying ( bool  val)
protected
override void GameAirShip.SyncNow ( )
protectedvirtual

Immediately synchronize the ship's position, rotation and velocity.

Reimplemented from Tasharen.Vehicle.

Member Data Documentation

GameObject GameAirShip.extraExplosion

Explosion prefab used when the hull hits something below.

float GameAirShip.forwardForce = 3f

Used to drive the ship forward.

float GameAirShip.forwardTilt = 1f

How much the ship will tilt when moving forward or back.

Transform GameAirShip.offset

Used to move the ship's renderers and colliders downwards when flying, in effect shifting the point around which it turns.

float GameAirShip.sidewaysTilt = 1f

How much the ship will tilt when moving left or right.

float GameAirShip.turnRate = 1f

How quickly the vehicle is able to turn.

float GameAirShip.turnRatePenalty = 0.75f

Lower speed penalizes the turn rate down to this percentage.

Property Documentation

override float GameAirShip.activeBrakeTorque
getprotected

There is far less friction up in the air.

bool GameAirShip.canLand
get

Whether we can land here.

override float GameAirShip.effectiveClearance
get

Clearance the ship requires in order to pass.

float GameAirShip.hoveringHeight
get

0 = in the water, 1 = 100% up in the air.

bool GameAirShip.isFlying
getset

Air ship can rise up in to the air.

override float GameAirShip.maximumSpeed
get

Ship must be up in the air for the full speed bonus.

override float GameAirShip.sightRange
get

How close the units have to be before they enter this unit's range of sight.


The documentation for this class was generated from the following file: