Class DewPlayer
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
Mirror.NetworkBehaviour
DewPlayer
Assembly: Dew.Core.dll
Syntax
[DewResourceLink(ResourceLinkBy.Type)]
public class DewPlayer : DewNetworkBehaviour, ILogicUpdate, ISettingsChangedCallback
Fields
allHumanPlayers
All human players that are connected to the server.
Declaration
public static List<DewPlayer> allHumanPlayers
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><DewPlayer> |
|
allies
Declaration
public readonly SyncList<DewPlayer> allies
Field Value
| Type |
Description |
| Mirror.SyncList<T><DewPlayer> |
|
availableLucidDreams
Declaration
[NonSerialized]
public List<string> availableLucidDreams
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><string> |
|
ClientEvent_OnDreamDustChanged
Declaration
public SafeAction<int, int> ClientEvent_OnDreamDustChanged
Field Value
ClientEvent_OnEarnDreamDust
Declaration
public SafeAction<int> ClientEvent_OnEarnDreamDust
Field Value
ClientEvent_OnEarnGold
Declaration
public SafeAction<int> ClientEvent_OnEarnGold
Field Value
ClientEvent_OnEarnStardust
Declaration
public SafeAction<int> ClientEvent_OnEarnStardust
Field Value
Declaration
public SafeAction<string, string> ClientEvent_OnEquippedNametagChanged
Field Value
ClientEvent_OnGiveCurrency
Arguments are as follows: Gold, DreamDust, Target
Declaration
public SafeAction<int, int, DewPlayer> ClientEvent_OnGiveCurrency
Field Value
ClientEvent_OnGoldChanged
Declaration
public SafeAction<int, int> ClientEvent_OnGoldChanged
Field Value
ClientEvent_OnHeroChanged
Declaration
public SafeAction<Hero, Hero> ClientEvent_OnHeroChanged
Field Value
ClientEvent_OnIsReadyChanged
Declaration
public SafeAction<bool> ClientEvent_OnIsReadyChanged
Field Value
ClientEvent_OnPlatinumCoinChanged
Declaration
public SafeAction<int, int> ClientEvent_OnPlatinumCoinChanged
Field Value
ClientEvent_OnSelectedAccessoriesChanged
Declaration
public SafeAction ClientEvent_OnSelectedAccessoriesChanged
Field Value
ClientEvent_OnSelectedDejavuItemChanged
Declaration
public SafeAction<string> ClientEvent_OnSelectedDejavuItemChanged
Field Value
ClientEvent_OnSelectedHeroTypeChanged
Declaration
public SafeAction<string> ClientEvent_OnSelectedHeroTypeChanged
Field Value
ClientEvent_OnSelectedLoadoutChanged
Declaration
public SafeAction<HeroLoadoutData> ClientEvent_OnSelectedLoadoutChanged
Field Value
ClientEvent_OnSelectedSkinChanged
Declaration
public SafeAction<string> ClientEvent_OnSelectedSkinChanged
Field Value
ClientEvent_OnSpendDreamDust
Declaration
public SafeAction<int> ClientEvent_OnSpendDreamDust
Field Value
ClientEvent_OnSpendGold
Declaration
public SafeAction<int> ClientEvent_OnSpendGold
Field Value
ClientEvent_OnSpendStardust
Declaration
public SafeAction<int> ClientEvent_OnSpendStardust
Field Value
ClientEvent_OnStateChanged
Declaration
public SafeAction ClientEvent_OnStateChanged
Field Value
enemies
Declaration
public readonly SyncList<DewPlayer> enemies
Field Value
| Type |
Description |
| Mirror.SyncList<T><DewPlayer> |
|
friendSteamIds
Declaration
[NonSerialized]
public List<string> friendSteamIds
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><string> |
|
gamePlayers
Human players that are playing the game.
Declaration
public static List<DewPlayer> gamePlayers
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><DewPlayer> |
|
lobbyPlayers
Human players that are in the lobby. Note: players can be in the lobby even after the game has been started, if they joined mid-game.
Declaration
public static List<DewPlayer> lobbyPlayers
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><DewPlayer> |
|
neutrals
Declaration
public readonly SyncList<DewPlayer> neutrals
Field Value
| Type |
Description |
| Mirror.SyncList<T><DewPlayer> |
|
onGamePlayerAdded
Declaration
public static SafeAction<DewPlayer> onGamePlayerAdded
Field Value
onGamePlayerRemoved
Declaration
public static SafeAction<DewPlayer> onGamePlayerRemoved
Field Value
onHumanPlayerAdded
Declaration
public static SafeAction<DewPlayer> onHumanPlayerAdded
Field Value
onHumanPlayerRemoved
Declaration
public static SafeAction<DewPlayer> onHumanPlayerRemoved
Field Value
onLobbyPlayerAdded
Declaration
public static SafeAction<DewPlayer> onLobbyPlayerAdded
Field Value
onLobbyPlayerRemoved
Declaration
public static SafeAction<DewPlayer> onLobbyPlayerRemoved
Field Value
onSpectatorAdded
Declaration
public static SafeAction<DewPlayer> onSpectatorAdded
Field Value
onSpectatorRemoved
Declaration
public static SafeAction<DewPlayer> onSpectatorRemoved
Field Value
ownedItems
Declaration
[NonSerialized]
public List<string> ownedItems
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><string> |
|
ownershipKeys
Declaration
public readonly SyncList<string> ownershipKeys
Field Value
| Type |
Description |
| Mirror.SyncList<T><string> |
|
selectedAccessories
Declaration
public readonly SyncList<string> selectedAccessories
Field Value
| Type |
Description |
| Mirror.SyncList<T><string> |
|
spectators
Human players that are in the game spectating. Note: this does not include game players with dead heroes.
Declaration
public static List<DewPlayer> spectators
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><DewPlayer> |
|
steamId
Declaration
Field Value
| Type |
Description |
| Steamworks.CSteamID |
|
unlockedGameItems
Declaration
public readonly SyncList<string> unlockedGameItems
Field Value
| Type |
Description |
| Mirror.SyncList<T><string> |
|
Properties
avatar
Declaration
public Texture2D avatar { get; }
Property Value
| Type |
Description |
| UnityEngine.Texture2D |
|
buyPriceMultiplier
Declaration
public float buyPriceMultiplier { get; set; }
Property Value
cleanseRefundMultiplier
Declaration
public float cleanseRefundMultiplier { get; set; }
Property Value
controllingEntity
Declaration
public Entity controllingEntity { get; set; }
Property Value
creep
Declaration
public static DewPlayer creep { get; }
Property Value
cursorWorldPos
Cursor world position of this player. Available on server and local client in-game.
Declaration
public Vector3 cursorWorldPos { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3 |
|
dismantleDreamDustMultiplier
Declaration
public float dismantleDreamDustMultiplier { get; set; }
Property Value
dismantleGemDreamDustMultiplier
Declaration
public float dismantleGemDreamDustMultiplier { get; set; }
Property Value
dismantleSkillDreamDustMultiplier
Declaration
public float dismantleSkillDreamDustMultiplier { get; set; }
Property Value
doubleChaosChance
Declaration
public float doubleChaosChance { get; set; }
Property Value
dreamDust
Declaration
[SaveVar(SaveVarFlags.Default)]
public int dreamDust { get; set; }
Property Value
environment
Environment player. Owner of server entities will default to this.
Declaration
public static DewPlayer environment { get; }
Property Value
Declaration
public string equippedNametag { get; }
Property Value
gamepadTargetEnemy
Available on server and local client in-game.
Declaration
public Entity gamepadTargetEnemy { get; }
Property Value
gold
Declaration
[SaveVar(SaveVarFlags.Default)]
public int gold { get; set; }
Property Value
guid
This is given for each profile.
Declaration
public string guid { get; set; }
Property Value
hero
Declaration
public Hero hero { get; set; }
Property Value
Available on server and local client in-game.
Declaration
public InputMode inputMode { get; }
Property Value
isCreepPlayer
Declaration
public bool isCreepPlayer { get; }
Property Value
isEnvironmentPlayer
Declaration
public bool isEnvironmentPlayer { get; }
Property Value
isEveryInfoSet
Declaration
public bool isEveryInfoSet { get; }
Property Value
isGamepadExplicitAim
Available on server and local client in-game.
Declaration
public bool isGamepadExplicitAim { get; }
Property Value
isHostPlayer
Declaration
public bool isHostPlayer { get; }
Property Value
isHumanPlayer
Declaration
public bool isHumanPlayer { get; }
Property Value
isKicked
Declaration
public bool isKicked { get; }
Property Value
Declaration
public bool isLoadingForMidJoin { get; set; }
Property Value
isPlayingCutscene
Is this player in a cutscene? Available on server.
Declaration
public bool isPlayingCutscene { get; }
Property Value
isReadingArtifactStory
Declaration
public bool isReadingArtifactStory { get; }
Property Value
isReady
Is ready to start the game (lobby) / travel to next node (ingame) / end the game (end result screen) ?
Declaration
public bool isReady { get; set; }
Property Value
isSamplingCastInfo
Declaration
public bool isSamplingCastInfo { get; }
Property Value
isWaitingForContinueMidJoin
Declaration
public bool isWaitingForContinueMidJoin { get; set; }
Property Value
local
Declaration
public static DewPlayer local { get; }
Property Value
monsterKillGoldMultiplier
Declaration
public float monsterKillGoldMultiplier { get; set; }
Property Value
platinumCoin
Declaration
[SaveVar(SaveVarFlags.Default)]
public int platinumCoin { get; set; }
Property Value
playerName
Declaration
public string playerName { get; }
Property Value
playerNameRaw
Declaration
public string playerNameRaw { get; set; }
Property Value
potionDropChanceMultiplier
Declaration
public float potionDropChanceMultiplier { get; set; }
Property Value
profileStats
Declaration
public DewProfileStats profileStats { get; }
Property Value
selectedDejavuItem
Declaration
public string selectedDejavuItem { get; }
Property Value
selectedHeroType
Declaration
public string selectedHeroType { get; }
Property Value
selectedLoadout
Declaration
public HeroLoadoutData selectedLoadout { get; }
Property Value
selectedSkin
Declaration
public string selectedSkin { get; }
Property Value
sellPriceMultiplier
Declaration
public float sellPriceMultiplier { get; set; }
Property Value
shopAddedItems
Declaration
public int shopAddedItems { get; set; }
Property Value
state
Declaration
[ShowInInspector]
[ReadOnly]
public PlayerState state { get; set; }
Property Value
totalMasteryLevel
Declaration
public int totalMasteryLevel { get; }
Property Value
Methods
AddDreamDust(int)
Declaration
public void AddDreamDust(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
AddGold(int)
Declaration
public void AddGold(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
Awake()
Declaration
protected override void Awake()
Overrides
CheckEnemyOrNeutral(Entity)
Declaration
public bool CheckEnemyOrNeutral(Entity target)
Parameters
| Type |
Name |
Description |
| Entity |
target |
|
Returns
CmdAuthorizeForUse(string)
Declaration
public void CmdAuthorizeForUse(string ownershipKey)
Parameters
| Type |
Name |
Description |
| string |
ownershipKey |
|
CmdGiveCurrency(int, int, DewPlayer)
Declaration
public void CmdGiveCurrency(int goldAmount, int dreamDustAmount, DewPlayer target)
Parameters
| Type |
Name |
Description |
| int |
goldAmount |
|
| int |
dreamDustAmount |
|
| DewPlayer |
target |
|
CmdNotifyEveryInfoSet()
Declaration
public void CmdNotifyEveryInfoSet()
CmdNotifyMidJoinReady(string)
Declaration
public void CmdNotifyMidJoinReady(string sceneName)
Parameters
| Type |
Name |
Description |
| string |
sceneName |
|
CmdPing()
Declaration
CmdRequestMidJoin()
Declaration
public void CmdRequestMidJoin()
CmdRequestOverrides()
Declaration
public void CmdRequestOverrides()
CmdRequestStardust(int)
Declaration
public void CmdRequestStardust(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
CmdRequestToJoinCurrentLobby()
Declaration
public void CmdRequestToJoinCurrentLobby()
CmdSetAccessories(List<string>)
Declaration
public void CmdSetAccessories(List<string> accessories)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<T><string> |
accessories |
|
CmdSetDejavuItem(string)
Declaration
public void CmdSetDejavuItem(string item)
Parameters
| Type |
Name |
Description |
| string |
item |
|
CmdSetHeroLoadoutData(HeroLoadoutData)
Declaration
public void CmdSetHeroLoadoutData(HeroLoadoutData newData)
Parameters
CmdSetHeroType(string)
Set local player's hero type. Can only be called in local machine of this DewPlayer.
Declaration
public void CmdSetHeroType(string newType)
Parameters
| Type |
Name |
Description |
| string |
newType |
|
CmdSetIsReady(bool)
Declaration
public void CmdSetIsReady(bool newReady)
Parameters
| Type |
Name |
Description |
| bool |
newReady |
|
Declaration
public void CmdSetNametag(string ntName)
Parameters
| Type |
Name |
Description |
| string |
ntName |
|
CmdSetProfileStats(DewProfileStats)
Declaration
public void CmdSetProfileStats(DewProfileStats stats)
Parameters
CmdSetSkin(string)
Declaration
public void CmdSetSkin(string skin)
Parameters
| Type |
Name |
Description |
| string |
skin |
|
CmdSetUnlockedGameItems()
Declaration
public void CmdSetUnlockedGameItems()
EarnDreamDust(int)
Declaration
public void EarnDreamDust(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
EarnGold(int)
Declaration
public void EarnGold(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
GetLocalUnlockedGameItems()
Declaration
public static string[] GetLocalUnlockedGameItems()
Returns
| Type |
Description |
| string[] |
|
GetTeamRelation(DewPlayer)
Declaration
public TeamRelation GetTeamRelation(DewPlayer other)
Parameters
Returns
GetTeamRelation(Entity)
Declaration
public TeamRelation GetTeamRelation(Entity other)
Parameters
| Type |
Name |
Description |
| Entity |
other |
|
Returns
GiveStardust(int)
Declaration
public void GiveStardust(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
HideOnScreenTimer(NetworkedOnScreenTimerHandle)
Declaration
public void HideOnScreenTimer(NetworkedOnScreenTimerHandle handle)
Parameters
IsAllowedToUseItem(string)
Declaration
public bool IsAllowedToUseItem(string itemName)
Parameters
| Type |
Name |
Description |
| string |
itemName |
|
Returns
Kick()
Declaration
LogicUpdate(float)
Declaration
public override void LogicUpdate(float dt)
Parameters
| Type |
Name |
Description |
| float |
dt |
|
Overrides
OnDestroy()
Declaration
protected override void OnDestroy()
Overrides
OnSettingsChanged()
Declaration
public void OnSettingsChanged()
OnStart()
Declaration
public override void OnStart()
Overrides
OnStartClient()
Declaration
public override void OnStartClient()
Overrides
OnStop()
Declaration
public override void OnStop()
Overrides
OnStopServer()
Declaration
public override void OnStopServer()
Overrides
PurgeRelationsList()
Purge any despawned / null entries in player relation lists.
Declaration
public void PurgeRelationsList()
RevalidateAllItems()
Declaration
public void RevalidateAllItems()
RpcInvokeOnSpendStardust(int)
Declaration
public void RpcInvokeOnSpendStardust(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
SendLog(string)
Declaration
public void SendLog(string message)
Parameters
| Type |
Name |
Description |
| string |
message |
|
SendLogError(string)
Declaration
public void SendLogError(string message)
Parameters
| Type |
Name |
Description |
| string |
message |
|
SendLogWarning(string)
Declaration
public void SendLogWarning(string message)
Parameters
| Type |
Name |
Description |
| string |
message |
|
ShowOnScreenTimer(NetworkedOnScreenTimerHandle)
Declaration
public void ShowOnScreenTimer(NetworkedOnScreenTimerHandle handle)
Parameters
Spend(Cost)
Note this will not work for stardusts.
Declaration
public void Spend(Cost cost)
Parameters
| Type |
Name |
Description |
| Cost |
cost |
|
SpendDreamDust(int)
Declaration
public void SpendDreamDust(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
SpendGold(int)
Declaration
public void SpendGold(int amount)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
TpcMakePlayerChangeLobby(string)
Declaration
public void TpcMakePlayerChangeLobby(string lobbyId)
Parameters
| Type |
Name |
Description |
| string |
lobbyId |
|
TpcNotifyDejavuUse()
Declaration
public void TpcNotifyDejavuUse()
TpcShowCenterMessage(CenterMessageType, string, string[])
Declaration
public void TpcShowCenterMessage(CenterMessageType type, string key, string[] localizedFormatArgs)
Parameters
TpcShowCenterMessage(CenterMessageType, string)
Declaration
public void TpcShowCenterMessage(CenterMessageType type, string key)
Parameters
TpcShowWorldPopMessage(WorldMessageSetting)
Declaration
public void TpcShowWorldPopMessage(WorldMessageSetting message)
Parameters
Operators
implicit operator NetworkConnectionToClient(DewPlayer)
Declaration
public static implicit operator NetworkConnectionToClient(DewPlayer p)
Parameters
Returns
| Type |
Description |
| Mirror.NetworkConnectionToClient |
|
Implements
Extension Methods