private void Start() { GetComponent <Image>().CrossFadeAlpha(0f, 0f, true); playerQuestManager = GameObject.FindGameObjectWithTag("PlayerMain").GetComponent <PlayerQuestManager>(); sourceClick = GetComponent <AudioSource>(); nameQuestAttached = GetComponentsInChildren <Text>()[0].text; }
public void CloseQuestSelector() { ToggleButtonListener(false); selectorsID = -1; _playerQuestManager = null; questUI.SetActive(false); }
protected override void AfterAwake() { /* Get the combat manager for this player */ combatManager = GetComponent <EntityCombatManager>(); if (combatManager == null) { throw new System.Exception("Why does this player not have a combat manager?"); } /* Get the player skills manager for this player */ skillsManager = GetComponent <PlayerSkillsManager>(); if (skillsManager == null) { throw new System.Exception("Why does this player not have a player skills manager?"); } /* Get our quest manager */ questManager = GetComponent <PlayerQuestManager>(); if (questManager == null) { throw new System.Exception("There is no quest manager attached to this player!"); } /* We're not inspecting any item right now */ inspecting = false; beforeInspecting = null; }
public void OpenQuestSelector(PlayerQuestManager questManager) { questUI.SetActive(true); _playerQuestManager = questManager; var questList = QuestPool.pooler.GetRandomQuestList(2); ToggleButtonListener(true); }
private void Awake() { if (instance != null && instance != this) { Destroy(gameObject); } else { instance = this; } }
private void Start() { this.hasHoop = false; this.sinceLast = 0.0f; this.source = GetComponent <AudioSource>(); this.isMoving = false; this.isInMenu = false; this.interactable = null; this.attributs = GetComponent <PlayerAttributes>(); this.rigidbody = GetComponent <Rigidbody>(); this.quests = GetComponent <PlayerQuestManager>(); this.graphic = GetComponentInChildren <PlayerGraphics>(); this.localCameraPositionSave = camera.transform.localPosition; this.localCameraRotationSave = camera.transform.localRotation; }
public void SetupPageManager(string player_name, PlayerQuestManager quests, EntitySkills skills, EntityCombatManager combat) { if (pages != null) { return; } /* Setup the page manager */ pages = new PageManager(this, quests.GetCurrentQuests(), quests.GetCompletedQuests()); /* Update player name */ pages.UpdateStats(player_name, skills, combat); if (debug) { Debug.Log("JournalManager: Journal has been setup."); } }
private void Awake() { _questManager = this.GetComponent <PlayerQuestManager>(); }