Class GamePlayer
Player that stores all the information necessary to identify objects and areas belonging to the player. It also allows sending and receiving messages from the host.
Inherited Members
Namespace: AutoBattleFramework.Multiplayer.BattleBehaviour.Player
Assembly: cs.temp.dll.dll
Syntax
public class GamePlayer : IPlayer
Methods
AddWinRewardClientRpc(UInt64, Int32)
When a player wins a round, the server rewards the winner.
Declaration
public void AddWinRewardClientRpc(ulong PlayerID, int amount)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | PlayerID | Winner ID. |
Int32 | amount | Amount to add to the shop currency. |
FusionMembers(List<GameCharacter>, ShopCharacter)
The client asks the server to merge characters, despawning them and spawning the result.
Declaration
public override void FusionMembers(List<GameCharacter> fusionMembers, ShopCharacter FusionResult)
Parameters
Type | Name | Description |
---|---|---|
List<GameCharacter> | fusionMembers | List of characters that compose the fusion that will be despawned. |
ShopCharacter | FusionResult | Result of the fusion to spawn. |
Overrides
NextStage()
The server sends the client to the next state.
Declaration
public override void NextStage()
Overrides
OnNetworkSpawn()
When spawning, stores the character and item benches, the TraitListUI and the SellZones. All other SellZones are disabled for the client. Also, moves the camera to the area intended for the player. This area will be a Transform with the name "Player X", where X is the index of the player.
Declaration
public override void OnNetworkSpawn()
RemoveItemFromCharacterClient(UInt64, UInt16)
The client removes an item from a character, modifying its statistics.
Declaration
public override void RemoveItemFromCharacterClient(ulong GameCharacterID, ushort itemModificatorIndex)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | GameCharacterID | Network ID of the character to which the item is to be removed. |
UInt16 | itemModificatorIndex | Index of the item to remove. |
Overrides
RemoveItemFromCharacterServer(UInt64, UInt16)
The server instructs clients to remove an item from a character, modifying its statistics.
Declaration
public override void RemoveItemFromCharacterServer(ulong GameCharacterID, ushort itemModificatorIndex)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | GameCharacterID | Network ID of the character to which the item is to be removed. |
UInt16 | itemModificatorIndex | Index of the item to remove. |
Overrides
ResetCharactersPositionsClient()
The server resets the position of the characters on the clients.
Declaration
public override void ResetCharactersPositionsClient()
Overrides
SpawnGameActorServer(Unity.Collections.FixedString128Bytes, Single, Single, Single)
Ask the server to spawn a GameActor at the given position.
Declaration
public override void SpawnGameActorServer(Unity.Collections.FixedString128Bytes itemName, float x, float y, float z)
Parameters
Type | Name | Description |
---|---|---|
Unity.Collections.FixedString128Bytes | itemName | GameActor item name |
Single | x | X position |
Single | y | Y position |
Single | z | Z position |