protected override void Awake() { base.Awake(); startScriptName = Engine.GetService <ScriptManager>()?.StartGameScriptName; titleMenu = GetComponentInParent <TitleMenu>(); player = Engine.GetService <ScriptPlayer>(); stateManager = Engine.GetService <StateManager>(); Debug.Assert(titleMenu && player != null); }
protected override void Awake() { base.Awake(); scriptManager = Engine.GetService <IScriptManager>(); startScriptName = scriptManager.StartGameScriptName; titleScriptName = scriptManager.Configuration.TitleScript; titleMenu = GetComponentInParent <TitleMenu>(); scriptPlayer = Engine.GetService <IScriptPlayer>(); stateManager = Engine.GetService <IStateManager>(); Debug.Assert(titleMenu && scriptPlayer != null); }