Search Results for

    Show / Hide Table of Contents

    Class GameManager

    Inheritance
    object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    Mirror.NetworkBehaviour
    DewNetworkBehaviour
    NetworkedManagerBase<GameManager>
    GameManager
    DevGameManager
    PlayGameManager
    Implements
    ILogicUpdate
    Inherited Members
    NetworkedManagerBase<GameManager>.instance
    NetworkedManagerBase<GameManager>.softInstance
    NetworkedManagerBase<GameManager>.OnEnable()
    NetworkedManagerBase<GameManager>.OnStartClient()
    NetworkedManagerBase<GameManager>.OnStopClient()
    DewNetworkBehaviour.FxPlayNewNetworked(GameObject, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlayNewNetworked(GameObject, Entity)
    DewNetworkBehaviour.FxPlayNewNetworked(GameObject, Entity, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlayNewNetworked(GameObject)
    DewNetworkBehaviour.FxPlayNetworked(GameObject)
    DewNetworkBehaviour.FxPlayNetworked(GameObject, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlayNetworked(GameObject, Entity)
    DewNetworkBehaviour.FxPlayNetworked(GameObject, Entity, Vector3, Quaternion?)
    DewNetworkBehaviour.FxStopNetworked(GameObject)
    DewNetworkBehaviour.FxPlayNew(GameObject)
    DewNetworkBehaviour.FxPlayNew(GameObject, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlayNew(GameObject, Entity)
    DewNetworkBehaviour.FxPlayNew(GameObject, Entity, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlay(GameObject)
    DewNetworkBehaviour.FxPlay(GameObject, Vector3, Quaternion?)
    DewNetworkBehaviour.FxPlay(GameObject, Entity)
    DewNetworkBehaviour.FxPlay(GameObject, Entity, Vector3, Quaternion?)
    DewNetworkBehaviour.FxStop(GameObject)
    DewNetworkBehaviour.FxApplySpeedMultiplier(GameObject, float)
    DewNetworkBehaviour.FxApplySpeedMultiplierNetworked(GameObject, float)
    DewNetworkBehaviour.InvalidateInstance()
    DewNetworkBehaviour.OnStopServer()
    DewNetworkBehaviour.OnLateStart()
    DewNetworkBehaviour.OnLateStartServer()
    DewNetworkBehaviour.OnStop()
    DewNetworkBehaviour.FrameUpdate()
    DewNetworkBehaviour.GetComponent<T>(out T)
    Namespace: Global
    Assembly: Dew.Core.dll
    Syntax
    public class GameManager : NetworkedManagerBase<GameManager>, ILogicUpdate

    Fields

    ClientEvent_OnAmbientLevelChanged

    Called everywhere when ambient level changes

    Declaration
    public SafeAction<int, int> ClientEvent_OnAmbientLevelChanged
    Field Value
    Type Description
    SafeAction<int, int>

    ClientEvent_OnDifficultyChanged

    Called everywhere when threat level changes

    Declaration
    public SafeAction<DewDifficultySettings, DewDifficultySettings> ClientEvent_OnDifficultyChanged
    Field Value
    Type Description
    SafeAction<DewDifficultySettings, DewDifficultySettings>

    ClientEvent_OnGameConcluded

    Called everywhere when game is concluded

    Declaration
    public SafeAction ClientEvent_OnGameConcluded
    Field Value
    Type Description
    SafeAction

    disableStuckCheck

    Declaration
    public bool disableStuckCheck
    Field Value
    Type Description
    bool

    gainedExpMultiplier

    Declaration
    [NonSerialized]
    public float gainedExpMultiplier
    Field Value
    Type Description
    float

    ges

    Declaration
    public DewGameplayExperienceSettings ges
    Field Value
    Type Description
    DewGameplayExperienceSettings

    gesTemplate

    Declaration
    [FormerlySerializedAs("gss")]
    public DewGameplayExperienceSettings gesTemplate
    Field Value
    Type Description
    DewGameplayExperienceSettings

    goldCostMultiplier

    Declaration
    [NonSerialized]
    public float goldCostMultiplier
    Field Value
    Type Description
    float

    goldIncomeMultiplier

    Declaration
    [NonSerialized]
    public float goldIncomeMultiplier
    Field Value
    Type Description
    float

    playerRejoinData

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public Dictionary<string, DewPersistence.PlayerData> playerRejoinData
    Field Value
    Type Description
    System.Collections.Generic.Dictionary<TKey, TValue><string, DewPersistence.PlayerData>

    predictionStrengthOverride

    Declaration
    public Func<float> predictionStrengthOverride
    Field Value
    Type Description
    System.Func<TResult><float>

    Properties

    ambientLevel

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public int ambientLevel { get; set; }
    Property Value
    Type Description
    int

    difficulty

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public DewDifficultySettings difficulty { get; set; }
    Property Value
    Type Description
    DewDifficultySettings

    elapsedGameTime

    Elapsed game time in seconds.

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public float elapsedGameTime { get; set; }
    Property Value
    Type Description
    float

    isGameConcluded

    Declaration
    public bool isGameConcluded { get; }
    Property Value
    Type Description
    bool

    isGameOverEnabled

    Declaration
    public bool isGameOverEnabled { get; set; }
    Property Value
    Type Description
    bool

    isGameTimePaused

    Declaration
    public bool isGameTimePaused { get; }
    Property Value
    Type Description
    bool

    isGameTimePausedByAfk

    Declaration
    public bool isGameTimePausedByAfk { get; set; }
    Property Value
    Type Description
    bool

    isGameTimePausedByGame

    Declaration
    public bool isGameTimePausedByGame { get; set; }
    Property Value
    Type Description
    bool

    isMidRunSaveLocked

    Is continue save blocked by LockMidRunSave()? Available everywhere.

    Declaration
    public bool isMidRunSaveLocked { get; }
    Property Value
    Type Description
    bool

    isSpawnOverPopulation

    Declaration
    public bool isSpawnOverPopulation { get; }
    Property Value
    Type Description
    bool

    maxAndSpawnedPopulationMultiplier

    Declaration
    public float maxAndSpawnedPopulationMultiplier { get; set; }
    Property Value
    Type Description
    float

    maxSpawnedPopulation

    Declaration
    public float maxSpawnedPopulation { get; }
    Property Value
    Type Description
    float

    runId

    Globally unique identifier of this run. This is consistent across all clients.

    Declaration
    [SaveVar(SaveVarFlags.Default)]
    public string runId { get; set; }
    Property Value
    Type Description
    string

    spawnedPopulation

    Total population excluding env spawns. => Spawns from combat areas.

    Declaration
    public float spawnedPopulation { get; }
    Property Value
    Type Description
    float

    Methods

    Awake()

    Declaration
    protected override void Awake()
    Overrides
    NetworkedManagerBase<GameManager>.Awake()

    CallOnReady(Action)

    Call provided function if the game is ready. (Client is ready, Server is not loading scene, has local hero, map is loaded, screen is shown)
    If not ready, the function call will be delayed until it is.
    Available on server and clients.

    Declaration
    public static void CallOnReady(Action action)
    Parameters
    Type Name Description
    System.Action action

    CollectAllPlayersRejoinData()

    Declaration
    public void CollectAllPlayersRejoinData()

    CollectPlayerRejoinData(DewPlayer)

    Declaration
    public void CollectPlayerRejoinData(DewPlayer p)
    Parameters
    Type Name Description
    DewPlayer p

    ConcludePureWhiteDream()

    Declaration
    public void ConcludePureWhiteDream()

    ConcludeUnknownFate()

    Declaration
    public void ConcludeUnknownFate()

    GetAdjustedDroppedExperienceAmount(float)

    Declaration
    public float GetAdjustedDroppedExperienceAmount(float original)
    Parameters
    Type Name Description
    float original
    Returns
    Type Description
    float

    GetAdjustedGoldAmount_Cost_Service(float)

    Declaration
    public float GetAdjustedGoldAmount_Cost_Service(float baseAmount)
    Parameters
    Type Name Description
    float baseAmount
    Returns
    Type Description
    float

    GetAdjustedGoldAmount_Cost(float)

    Declaration
    public float GetAdjustedGoldAmount_Cost(float amount)
    Parameters
    Type Name Description
    float amount
    Returns
    Type Description
    float

    GetAdjustedGoldAmount_Income(float)

    Declaration
    public float GetAdjustedGoldAmount_Income(float amount)
    Parameters
    Type Name Description
    float amount
    Returns
    Type Description
    float

    GetAdjustedGoldAmount(float)

    Declaration
    public float GetAdjustedGoldAmount(float amount)
    Parameters
    Type Name Description
    float amount
    Returns
    Type Description
    float

    GetAdjustedMonsterSpawnPopulation(float, bool, bool)

    Declaration
    public float GetAdjustedMonsterSpawnPopulation(float original, bool ignoreTurnMultiplier = false, bool ignoreCoopMultiplier = false)
    Parameters
    Type Name Description
    float original
    bool ignoreTurnMultiplier
    bool ignoreCoopMultiplier
    Returns
    Type Description
    float

    GetAdjustedMonsterWaves(int, DewRandom)

    Declaration
    public int GetAdjustedMonsterWaves(int original, DewRandom random = null)
    Parameters
    Type Name Description
    int original
    DewRandom random
    Returns
    Type Description
    int

    GetAdjustedMonsterWavesMultiplier()

    Declaration
    public float GetAdjustedMonsterWavesMultiplier()
    Returns
    Type Description
    float

    GetBossMonsterDamageMultiplierByScaling(float)

    Declaration
    public float GetBossMonsterDamageMultiplierByScaling(float customZoneIndex = NaN)
    Parameters
    Type Name Description
    float customZoneIndex
    Returns
    Type Description
    float

    GetBossMonsterHealthMultiplierByScaling(float)

    Declaration
    public float GetBossMonsterHealthMultiplierByScaling(float customZoneIndex = NaN)
    Parameters
    Type Name Description
    float customZoneIndex
    Returns
    Type Description
    float

    GetCleanseGemMinQuality()

    Declaration
    public int GetCleanseGemMinQuality()
    Returns
    Type Description
    int

    GetCleanseGoldCost(Gem)

    Declaration
    public int GetCleanseGoldCost(Gem gem)
    Parameters
    Type Name Description
    Gem gem
    Returns
    Type Description
    int

    GetCleanseGoldCost(SkillTrigger)

    Declaration
    public int GetCleanseGoldCost(SkillTrigger skill)
    Parameters
    Type Name Description
    SkillTrigger skill
    Returns
    Type Description
    int

    GetCleanseReturnedDreamDust(DewPlayer, Gem)

    Declaration
    public int GetCleanseReturnedDreamDust(DewPlayer player, Gem gem)
    Parameters
    Type Name Description
    DewPlayer player
    Gem gem
    Returns
    Type Description
    int

    GetCleanseReturnedDreamDust(DewPlayer, SkillTrigger)

    Declaration
    public int GetCleanseReturnedDreamDust(DewPlayer player, SkillTrigger skill)
    Parameters
    Type Name Description
    DewPlayer player
    SkillTrigger skill
    Returns
    Type Description
    int

    GetCleanseSkillMinLevel()

    Declaration
    public int GetCleanseSkillMinLevel()
    Returns
    Type Description
    int

    GetDifficulty()

    Declaration
    protected virtual DewDifficultySettings GetDifficulty()
    Returns
    Type Description
    DewDifficultySettings

    GetExpDropFromEntity(Entity)

    Declaration
    public float GetExpDropFromEntity(Entity ent)
    Parameters
    Type Name Description
    Entity ent
    Returns
    Type Description
    float

    GetGainedSkillHastePerSkillLevel(SkillTrigger)

    Declaration
    public float GetGainedSkillHastePerSkillLevel(SkillTrigger skillTrigger)
    Parameters
    Type Name Description
    SkillTrigger skillTrigger
    Returns
    Type Description
    float

    GetGemUpgradeAddedQuality()

    Declaration
    public int GetGemUpgradeAddedQuality()
    Returns
    Type Description
    int

    GetGemUpgradeDreamDustCost(Gem)

    Declaration
    public int GetGemUpgradeDreamDustCost(Gem gem)
    Parameters
    Type Name Description
    Gem gem
    Returns
    Type Description
    int

    GetGemUpgradeDreamDustCost(int)

    Declaration
    public int GetGemUpgradeDreamDustCost(int quality)
    Parameters
    Type Name Description
    int quality
    Returns
    Type Description
    int

    GetKillGoldAmount(Entity)

    Declaration
    public int GetKillGoldAmount(Entity ent)
    Parameters
    Type Name Description
    Entity ent
    Returns
    Type Description
    int

    GetLucidDreams()

    Declaration
    public virtual IList<string> GetLucidDreams()
    Returns
    Type Description
    System.Collections.Generic.IList<T><string>

    GetMiniBossMonsterDamageMultiplierByScaling(float)

    Declaration
    public float GetMiniBossMonsterDamageMultiplierByScaling(float customZoneIndex = NaN)
    Parameters
    Type Name Description
    float customZoneIndex
    Returns
    Type Description
    float

    GetMiniBossMonsterHealthMultiplierByScaling(float)

    Declaration
    public float GetMiniBossMonsterHealthMultiplierByScaling(float customZoneIndex = NaN)
    Parameters
    Type Name Description
    float customZoneIndex
    Returns
    Type Description
    float

    GetMonsterBonusHealthPercentageByMultiplayer(Monster)

    Declaration
    public float GetMonsterBonusHealthPercentageByMultiplayer(Monster m)
    Parameters
    Type Name Description
    Monster m
    Returns
    Type Description
    float

    GetMonsterBonusPowerPercentage(Monster)

    Declaration
    public float GetMonsterBonusPowerPercentage(Monster m)
    Parameters
    Type Name Description
    Monster m
    Returns
    Type Description
    float

    GetMultiplayerDifficultyFactor(bool)

    Get amount of extra players. Solo: 0, Two: 1, ...
    If reduceWhenDead is set, dead player will contribute 55% percent instead of 100% to the factor.

    Declaration
    public float GetMultiplayerDifficultyFactor(bool reduceWhenDead)
    Parameters
    Type Name Description
    bool reduceWhenDead
    Returns
    Type Description
    float

    GetMultiplier_Imp(double, double, double, double, double, int)

    Declaration
    public static float GetMultiplier_Imp(double x, double a, double b, double c, double d, int linearStart)
    Parameters
    Type Name Description
    double x
    double a
    double b
    double c
    double d
    int linearStart
    Returns
    Type Description
    float

    GetPredictionStrength()

    Declaration
    public float GetPredictionStrength()
    Returns
    Type Description
    float

    GetRegularMonsterDamageMultiplierByScaling(float)

    Declaration
    public float GetRegularMonsterDamageMultiplierByScaling(float customZoneIndex = NaN)
    Parameters
    Type Name Description
    float customZoneIndex
    Returns
    Type Description
    float

    GetRegularMonsterHealthMultiplierByScaling(float)

    Declaration
    public float GetRegularMonsterHealthMultiplierByScaling(float customZoneIndex = NaN)
    Parameters
    Type Name Description
    float customZoneIndex
    Returns
    Type Description
    float

    GetSkillUpgradeDreamDustCost(SkillTrigger)

    Declaration
    public int GetSkillUpgradeDreamDustCost(SkillTrigger skill)
    Parameters
    Type Name Description
    SkillTrigger skill
    Returns
    Type Description
    int

    GetSkillUpgradeDreamDustCost(int)

    Declaration
    public int GetSkillUpgradeDreamDustCost(int level)
    Parameters
    Type Name Description
    int level
    Returns
    Type Description
    int

    GetSpecialRewardAmount_DreamDust()

    Declaration
    public float GetSpecialRewardAmount_DreamDust()
    Returns
    Type Description
    float

    GetSpecialRewardAmount_Gold()

    Declaration
    public float GetSpecialRewardAmount_Gold()
    Returns
    Type Description
    float

    GetSpecialSkillChanceMultiplier()

    Declaration
    public float GetSpecialSkillChanceMultiplier()
    Returns
    Type Description
    float

    GetStrongHealthScalingMultiplier_Imp(float)

    Declaration
    public static float GetStrongHealthScalingMultiplier_Imp(float zi)
    Parameters
    Type Name Description
    float zi
    Returns
    Type Description
    float

    GetUniversalDamageScalingMultiplier_Imp(float)

    Declaration
    public static float GetUniversalDamageScalingMultiplier_Imp(float zi)
    Parameters
    Type Name Description
    float zi
    Returns
    Type Description
    float

    GetWeakHealthScalingMultiplier_Imp(float)

    Declaration
    public static float GetWeakHealthScalingMultiplier_Imp(float zi)
    Parameters
    Type Name Description
    float zi
    Returns
    Type Description
    float

    IsContinueSaveSupported()

    Is continue-saving a normal thing in this game manager? If not, no continue save will be made, and user will not be notified with any save-related things.
    Used to tell apart from normal game and special games like tutorial.

    Declaration
    public virtual bool IsContinueSaveSupported()
    Returns
    Type Description
    bool

    IsEligibleForMidRunSave()

    Can the game be saved mid-run right now? Usually save is made every travel, but after clearing the room, the game can be saved mid-run e.g. before exiting the game.

    Declaration
    public bool IsEligibleForMidRunSave()
    Returns
    Type Description
    bool

    IsLazyCallReady()

    Declaration
    public virtual bool IsLazyCallReady()
    Returns
    Type Description
    bool

    LoadNextZone()

    Declaration
    public virtual void LoadNextZone()

    LockMidRunSave()

    Calling this will lock mid-run save.
    If a continue save hasn't been made for more than 20 seconds, a continue save will be immediately made.
    This call MUST BE ACCOMPANIED by the same number of UnlockMidRunSave() calls.

    Declaration
    public void LockMidRunSave()

    LogicUpdate(float)

    Declaration
    public override void LogicUpdate(float dt)
    Parameters
    Type Name Description
    float dt
    Overrides
    DewNetworkBehaviour.LogicUpdate(float)

    OnDestroy()

    Declaration
    protected override void OnDestroy()
    Overrides
    DewNetworkBehaviour.OnDestroy()

    OnStart()

    Declaration
    public override void OnStart()
    Overrides
    DewNetworkBehaviour.OnStart()

    OnStartServer()

    Declaration
    public override void OnStartServer()
    Overrides
    DewNetworkBehaviour.OnStartServer()

    ResetGameplayExperienceSettings()

    Declaration
    public void ResetGameplayExperienceSettings()

    SaveContinueData(LoadNodeSettings)

    Declaration
    public void SaveContinueData(LoadNodeSettings s)
    Parameters
    Type Name Description
    LoadNodeSettings s

    SaveContinueDataMidRun()

    Declaration
    public void SaveContinueDataMidRun()

    SetAmbientLevel(int)

    Level will be clamped accordingly to GSS.

    Declaration
    public void SetAmbientLevel(int newLevel)
    Parameters
    Type Name Description
    int newLevel

    SetDisconnectedForEveryoneElse()

    Declaration
    public void SetDisconnectedForEveryoneElse()

    SetElapsedGameTime(float)

    Declaration
    public void SetElapsedGameTime(float newTime)
    Parameters
    Type Name Description
    float newTime

    UnlockMidRunSave()

    Calling this will unlock and allow mid-run saves.
    This call MUST BE DONE AFTER LockMidRunSave() calls.

    Declaration
    public void UnlockMidRunSave()

    UpdateSpawnedPopulation()

    Declaration
    public void UpdateSpawnedPopulation()

    WrapUpAndShowResult(ResultType)

    Declaration
    public void WrapUpAndShowResult(DewGameResult.ResultType type)
    Parameters
    Type Name Description
    DewGameResult.ResultType type

    Implements

    ILogicUpdate

    Extension Methods

    DewGUI.SetExpandHeight<T>(T, bool)
    DewGUI.SetExpandHeight<T>(T, float)
    DewGUI.SetExpandWidth<T>(T, bool)
    DewGUI.SetExpandWidth<T>(T, float)
    DewGUI.SetHeight<T>(T, float)
    DewGUI.SetText<T>(T, string)
    DewGUI.SetTextLocalized<T>(T, string)
    DewGUI.SetWidth<T>(T, float)
    In This Article
    Back to top Shape of Dreams API Documentation