private void Awake() { gameState = Utils.FindNovaGameController().GetComponent <GameState>(); audioSource = GetComponent <AudioSource>(); LuaRuntime.Instance.BindObject(audioControllerName, this); gameState.AddRestorable(this); }
private void Awake() { _spriteChanger = GetComponent <SpriteChangerWithFade>(); LuaRuntime.Instance.BindObject("backgroundController", this); gameState = Utils.FindNovaGameController().GetComponent <GameState>(); gameState.AddRestorable(this); }
protected override void Awake() { base.Awake(); var controller = Utils.FindNovaGameController(); gameState = controller.GameState; checkpointManager = controller.CheckpointManager; configManager = controller.ConfigManager; scrollRect = myPanel.GetComponentInChildren <ScrollRect>(); logContent = scrollRect.transform.Find("Viewport/Content").gameObject; myPanel.GetComponent <Button>().onClick.AddListener(Hide); gameState.DialogueWillChange += OnDialogueWillChange; gameState.DialogueChanged += OnDialogueChanged; gameState.AddRestorable(this); closeButton.onClick.AddListener(Hide); previousVariablesHash = ""; lastCheckpointLogParamsRef = null; }
private void Awake() { Current = this; var text = Resources.Load <TextAsset>("LocalizedResourcePaths"); if (text) { LocalizedResourcePaths.UnionWith(text.text.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)); } cachedAssets = new Dictionary <AssetCacheType, LRUCache <string, CachedAssetEntry> > { [AssetCacheType.Image] = new LRUCache <string, CachedAssetEntry>(20, true), [AssetCacheType.StandingLayer] = new LRUCache <string, CachedAssetEntry>(20, true), [AssetCacheType.Prefab] = new LRUCache <string, CachedAssetEntry>(1, true), [AssetCacheType.Audio] = new LRUCache <string, CachedAssetEntry>(4, true) }; gameState = Utils.FindNovaGameController().GameState; gameState.AddRestorable(this); Application.lowMemory += UnloadUnusedAndCachedAssets; I18n.LocaleChanged.AddListener(OnLocaleChanged); }
private void Awake() { LuaRuntime.Instance.BindObject(characterVariableName, this, "_G"); audioSource = GetComponent <AudioSource>(); gameState = Utils.FindNovaGameController().GetComponent <GameState>(); gameState.DialogueChanged += OnDialogueChanged; gameState.DialogueWillChange += OnDialogueWillChange; characterAppearance = transform.Find("Appearance").gameObject; gameState.AddRestorable(this); }
protected virtual void Awake() { gameState = Utils.FindNovaGameController().GameState; if (!string.IsNullOrEmpty(luaName)) { LuaRuntime.Instance.BindObject(luaName, this); gameState.AddRestorable(this); } }
private void Awake() { gameState = Utils.FindNovaGameController().GameState; videoPlayer = GetComponent <VideoPlayer>(); if (!string.IsNullOrEmpty(luaName)) { LuaRuntime.Instance.BindObject(luaName, this); gameState.AddRestorable(this); } }
private void Awake() { gameState = Utils.FindNovaGameController().GameState; cameraPP = mainCamera.GetComponent <PostProcessing>(); if (!string.IsNullOrEmpty(luaName)) { LuaRuntime.Instance.BindObject(luaName, this); gameState.AddRestorable(this); } }
private void Awake() { gameState = Utils.FindNovaGameController().GameState; meshRenderer = GetComponent <MeshRenderer>(); meshEnabled = false; if (!string.IsNullOrEmpty(luaGlobalName)) { LuaRuntime.Instance.BindObject(luaGlobalName, this, "_G"); gameState.AddRestorable(this); } }
private void Awake() { gameState = Utils.FindNovaGameController().GameState; foreach (var config in autoVoiceConfigs) { var name = config.characterName; nameToConfig[name] = config; nameToEnabled[name] = false; nameToIndex[name] = 0; } if (!string.IsNullOrEmpty(luaName)) { LuaRuntime.Instance.BindObject(luaName, this); gameState.AddRestorable(this); } }
private void Awake() { Current = this; var text = Resources.Load <TextAsset>("LocalizedResourcePaths").text; LocalizedResourcePaths.UnionWith(text.Split('\n')); cachedAssets = new Dictionary <AssetCacheType, LRUCache <string, CachedAssetEntry> > { [AssetCacheType.Image] = new LRUCache <string, CachedAssetEntry>(autoDestroy: true, maxSize: 20), [AssetCacheType.StandingLayer] = new LRUCache <string, CachedAssetEntry>(autoDestroy: true, maxSize: 20), [AssetCacheType.Timeline] = new LRUCache <string, CachedAssetEntry>(autoDestroy: true, maxSize: 1), [AssetCacheType.Audio] = new LRUCache <string, CachedAssetEntry>(autoDestroy: true, maxSize: 4) }; gameState = Utils.FindNovaGameController().GameState; gameState.AddRestorable(this); Application.lowMemory += UnloadUnusedAndCachedAssets; I18n.LocaleChanged.AddListener(OnLocaleChanged); }
private void Awake() { gameState = Utils.FindNovaGameController().GameState; gameState.BranchOccurs += OnBranchHappen; gameState.AddRestorable(this); }
private void Awake() { gameState = Utils.FindNovaGameController().GameState; gameState.selectionOccurs.AddListener(RaiseSelectionsCallback); gameState.AddRestorable(this); }