public override void Unload() { bloodLevel = null; NoteUI = null; AetherUI = null; bloodLevelUI = notesUI = aetherUI = null; UseBlood = null; TynCoinID = tng = alc = default; }
/// <summary> /// Create a note UI for the list /// </summary> private void CreateNoteUI(Note data, int index) { NoteUI note = Instantiate(notePrefab); note.transform.parent = NoteListUI.transform; RectTransform rt = note.GetComponent <RectTransform>(); //rt.SetPositionAndRotation(new Vector3(2, 30 * index, rt.localPosition.z), rt.localRotation); rt.anchoredPosition = new Vector2(rt.anchoredPosition.x, -30 * index); //rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Top, 30 * index, rt.rect.height); note.NoteData = data; note.OnOpen = OnOpenNote; }
private void PopulateNotes() { foreach (ClueID clue in clueNotes.Keys) { if (PhoneOS.ClueRequirementMet(clue)) { GameObject noteObj = Instantiate(NotePrefab, NotesParent); NoteUI noteUI = noteObj.GetComponent <NoteUI>(); if (noteUI) { noteUI.Text.text = clueNotes[clue]; } } } }
private void UnloadUI() { VeritasAbilityKey = null; Bandolier = null; SoulBank = null; VitalityAbilityKey = null; _interfaceVitality = null; vitalityBar = null; _interfaceShieldBroken = null; shieldBrokenUI = null; _interfaceInfectionBar = null; infectionBar = null; _interfaceNoteUI = null; noteUI = null; }
private void LoadUI() { vitalityBar = new VitalityBar(); vitalityBar.Activate(); _interfaceVitality = new UserInterface(); _interfaceVitality.SetState(vitalityBar); shieldBrokenUI = new ShieldBrokenUI(); shieldBrokenUI.Activate(); _interfaceShieldBroken = new UserInterface(); _interfaceShieldBroken.SetState(shieldBrokenUI); infectionBar = new InfectionBar(); infectionBar.Activate(); _interfaceInfectionBar = new UserInterface(); _interfaceInfectionBar.SetState(infectionBar); noteUI = new NoteUI(); noteUI.Activate(); _interfaceNoteUI = new UserInterface(); _interfaceNoteUI.SetState(noteUI); }
public override void Load() { bloodLevel = new BloodUI(); bloodLevel.Initialize(); bloodLevelUI = new UserInterface(); bloodLevelUI.SetState(bloodLevel); NoteUI = new NoteUI(); NoteUI.Initialize(); notesUI = new UserInterface(); notesUI.SetState(NoteUI); AetherUI = new AetherUI(); AetherUI.Initialize(); aetherUI = new UserInterface(); aetherUI.SetState(AetherUI); UseBlood = RegisterHotKey("Use Blood Magic", "G"); TynCoinID = CustomCurrencyManager.RegisterCurrency(new TynCoin(ModContent.ItemType <Items.TynCoin>(), 999L)); tng = GetSoundSlot(SoundType.Music, "Sounds/Music/TouchNGo"); alc = GetSoundSlot(SoundType.Music, "Sounds/Music/Alchemy"); }
void Awake() { instance = this; }