Class NGO_GameItem
Game item that can be attached to NGO_GameCharacter when dragged over it. This item is designed for multiplayer mode.
Namespace: AutoBattleFramework.Multiplayer.BattleBehaviour.GameActors
Assembly: cs.temp.dll.dll
Syntax
public class NGO_GameItem : GameItem
Methods
AddItemModificator(GameCharacter)
Equip the item to the character. Then ask the server to despawn the item and update the stats in other clients.
Declaration
public override void AddItemModificator(GameCharacter character)
Parameters
| Type | Name | Description |
|---|---|---|
| GameCharacter | character |
AddLocalItemToCharacter(GameCharacter)
Locally equips the item to a character. Use only when the information is synchronized with the server.
Declaration
public void AddLocalItemToCharacter(GameCharacter character)
Parameters
| Type | Name | Description |
|---|---|---|
| GameCharacter | character | Character to which the item is equipped. |
Buy(GameActor)
Ask the server to instantiate the purchased item.
Declaration
public override GameActor Buy(GameActor shopItem)
Parameters
| Type | Name | Description |
|---|---|---|
| GameActor | shopItem | GameItem to buy. |
Returns
| Type | Description |
|---|---|
| GameActor | null |
GetTeamIndex()
Get the index of the team to which the item belongs.
Declaration
protected override int GetTeamIndex()
Returns
| Type | Description |
|---|---|
| Int32 | Index of the team to which the item belongs. |
OnNetworkSpawn()
When spawned, apply traits, set state, and rotation.
Declaration
public override void OnNetworkSpawn()
SetVariablesOnBuy(GameItem, IPlayer)
When spawned, set position and rotation.
Declaration
protected override void SetVariablesOnBuy(GameItem item, IPlayer player = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GameItem | item | |
| IPlayer | player | The owner player instance. |
Start()
Declaration
protected override void Start()
Update()
Declaration
protected override void Update()