コード例 #1
0
 private void Start()
 {
     GetComponent <Image>().CrossFadeAlpha(0f, 0f, true);
     playerQuestManager = GameObject.FindGameObjectWithTag("PlayerMain").GetComponent <PlayerQuestManager>();
     sourceClick        = GetComponent <AudioSource>();
     nameQuestAttached  = GetComponentsInChildren <Text>()[0].text;
 }
コード例 #2
0
 public void CloseQuestSelector()
 {
     ToggleButtonListener(false);
     selectorsID         = -1;
     _playerQuestManager = null;
     questUI.SetActive(false);
 }
コード例 #3
0
    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;
    }
コード例 #4
0
    public void OpenQuestSelector(PlayerQuestManager questManager)
    {
        questUI.SetActive(true);
        _playerQuestManager = questManager;
        var questList = QuestPool.pooler.GetRandomQuestList(2);

        ToggleButtonListener(true);
    }
コード例 #5
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
     }
 }
コード例 #6
0
 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;
 }
コード例 #7
0
ファイル: JournalManager.cs プロジェクト: pierrce/portfolio
    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.");
        }
    }
コード例 #8
0
 private void Awake()
 {
     _questManager = this.GetComponent <PlayerQuestManager>();
 }