private void OnValidate() { yarnUI = GetComponent <CustomDialogUI>(); storage = GetComponent <InMemoryVariableStorage>(); runner = GetComponent <DialogueRunner>(); canvas = GetComponentInParent <Canvas>(); }
// Start is called before the first frame update void Start() { if (majorConvoNodes.Length != majorConvoTrust.Length) { Debug.LogError("Error! There are not the same number of MajorConvo nodes and required trust levels!"); Destroy(this.gameObject); } gm = GameManager.getInstance(); ConvertSchedule(); gm.RegisterInteractable(this.gameObject.transform, this); spriteRenderer = this.gameObject.GetComponent <SpriteRenderer>(); gm.SubscribeDayTimeChangeListener(this); rb = GetComponent <Rigidbody2D>(); yarnVars = FindObjectOfType <InMemoryVariableStorage>(); if (scriptToLoad != null) { dialogueRunner = FindObjectOfType <Yarn.Unity.DialogueRunner>(); dialogueRunner.Add(scriptToLoad); } if (!LoadStats()) { majorConvoIndex = 0; } AddToStart(); DayTimeChange(gm.currentDay, gm.currentTime); }
// Start is called before the first frame update void Start() { m_playerControls = GetComponent <PlayerController>().PlayerControls; m_eventManager = EventManager.Instance; m_playerInput = GetComponent <PlayerInput>(); m_playerMovement = GetComponent <PlayerMovement>(); m_fishingController = FishingController.Instance; m_uiManager = UIManager.Instance; m_caughFish = new HashSet <CollectibleItem.ItemID>(); m_variableStorage = FindObjectOfType <InMemoryVariableStorage>(); m_playerControls.Player.Interact.started += SwitchToFishing; m_playerControls.Fishing.Interact.started += FishingInteract; m_playerControls.Fishing.Cancel.started += FishingCancel; m_playerControls.Fishing.Vertical.started += AimFishingReticleVert; m_playerControls.Fishing.Vertical.canceled += AimFishingReticleVert; m_playerControls.Fishing.Horizontal.started += AimFishingReticleHori; m_playerControls.Fishing.Horizontal.canceled += AimFishingReticleHori; m_playerControls.Fishing.Disable(); m_fishingReticle.SetActive(false); m_fishingRod.SetActive(false); m_eventManager.AddFishReelStartListener(FishReelStarted); m_eventManager.AddFishReelEndedListener(FishReelEnded); m_eventManager.AddSkillUnlockedListener(UpdateFishingCapability); }
public bool pause; //for a shot // Start is called before the first frame update void Start() { yarnVars = GetComponent <InMemoryVariableStorage>(); dr = FindObjectOfType <DialogueRunner>(); opponentBullets = 3; }
void Start() { npcManager = NPCManager.instance; npcMemory = npcManager.GetComponent <InMemoryVariableStorage>(); rewind = RewindManager.instance; light = GetComponentInChildren <Light2D>(); inventory = Inventory.instance; playerShooting = GetComponent <PlayerShooting>(); isInDialogue = false; }
void Start() { npc = NPCManager.instance; memory = npc.GetComponent <InMemoryVariableStorage>(); audio = GetComponent <AudioSource>(); audio.clip = Resources.Load <AudioClip>("Music/kozak"); loseWinPanel.SetActive(false); player = PlayerController.instance; isInExitArea = false; Time.timeScale = 1; audio.Play(); isSalsaPlaying = false; gameEnd = false; }
// Start is called before the first frame update void Start() { _memStorage = this.GetComponent <InMemoryVariableStorage>(); setForgiveness(loadForgiveness()); Debug.Log("Yarn variable forgiveness set to saved value of " + loadForgiveness()); }
private void Start() { ocList = FindObjectOfType <OCList>(); allOCs = ocList.allOCs; variableMemory = FindObjectOfType <InMemoryVariableStorage>(); }
private void Start() { variableStorage = FindObjectOfType <InMemoryVariableStorage>(); clickManager = FindObjectOfType <ClickManager>(); allOCS = FindObjectOfType <OCList>().allOCs; }
// Start is called before the first frame update void Start() { varStore = GameObject.Find("Dialogue Runner").GetComponent <InMemoryVariableStorage>(); }
public static int IntFromVariableName(string name, InMemoryVariableStorage storage) { return(Mathf.CeilToInt(storage.GetValue(name).AsNumber)); }