C# Class UWCombat, UnderworldExporter

Inheritance: Combat
Mostrar archivo Open project: hankmorgan/UnderworldExporter Class Usage Examples

Public Properties

Property Type Description
CurrentStrike string
currWeapon WeaponMelee,
currWeaponRanged WeaponRanged,
currentAmmo ObjectInteraction,

Public Methods

Method Description
CombatBegin ( ) : void

Begins the combat state of the player. Sets AttackCharging. Animates the weapon becoming ready. For ranged weaponry it checks for the weapon ammo.

CombatCharging ( ) : void

Increases the Charge by the charge rate * Time.deltaTime.

ExecuteMelee ( string StrikeType, float StrikeCharge ) : IEnumerator

Executes the melee attack after the attack has been released. Casts a ray from the centre of the screen in mouselook mode or from the cursor position Waits a period of time after the release before casting the ray.

ExecuteRanged ( ) : void

Execution of ranged attacks

GetHand ( ) : string

Gets the handedness of the character

GetRace ( ) : string

Gets the race of the charcter for displaying their skin colour based on the Body variable of UWCharacter

GetStrikeType ( ) : string

Gets the type of the strike based on where the mouse cursor is located on the Y axis of the viewport. Returns one of Bash, Slash or Stab

GetWeapon ( ) : string

Gets the weapon type One of sword, axe, mace or fist for melee or Ranged for ranged weapons

IsMelee ( ) : bool

Determines whether this current weapn is melee or ranged

PlayerCombatIdle ( ) : void
ReleaseAttack ( ) : void

Releases the attack.

Private Methods

Method Description
LaunchAmmo ( ) : bool

Launchs the ammo.

RollForAHitMelee ( NPC, Origin, ObjectInteraction, Target ) : int
RollForAHitMelee ( UWCharacter, Origin, ObjectInteraction, Target, WeaponMelee, weap ) : int

Method Details

CombatBegin() public method

Begins the combat state of the player. Sets AttackCharging. Animates the weapon becoming ready. For ranged weaponry it checks for the weapon ammo.
public CombatBegin ( ) : void
return void

CombatCharging() public method

Increases the Charge by the charge rate * Time.deltaTime.
public CombatCharging ( ) : void
return void

ExecuteMelee() public method

Executes the melee attack after the attack has been released. Casts a ray from the centre of the screen in mouselook mode or from the cursor position Waits a period of time after the release before casting the ray.
public ExecuteMelee ( string StrikeType, float StrikeCharge ) : IEnumerator
StrikeType string
StrikeCharge float
return IEnumerator

ExecuteRanged() public method

Execution of ranged attacks
public ExecuteRanged ( ) : void
return void

GetHand() public method

Gets the handedness of the character
public GetHand ( ) : string
return string

GetRace() public method

Gets the race of the charcter for displaying their skin colour based on the Body variable of UWCharacter
public GetRace ( ) : string
return string

GetStrikeType() public method

Gets the type of the strike based on where the mouse cursor is located on the Y axis of the viewport. Returns one of Bash, Slash or Stab
public GetStrikeType ( ) : string
return string

GetWeapon() public method

Gets the weapon type One of sword, axe, mace or fist for melee or Ranged for ranged weapons
public GetWeapon ( ) : string
return string

IsMelee() public method

Determines whether this current weapn is melee or ranged
public IsMelee ( ) : bool
return bool

PlayerCombatIdle() public method

public PlayerCombatIdle ( ) : void
return void

ReleaseAttack() public method

Releases the attack.
public ReleaseAttack ( ) : void
return void

Property Details

CurrentStrike public_oe property

public string CurrentStrike
return string

currWeapon public_oe property

public WeaponMelee, currWeapon
return WeaponMelee,

currWeaponRanged public_oe property

public WeaponRanged, currWeaponRanged
return WeaponRanged,

currentAmmo public_oe property

public ObjectInteraction, currentAmmo
return ObjectInteraction,