Ejemplo n.º 1
0
    //Notes/Weight////////////////////////////////

    private void Start()
    {
        for (int i = 0; i < 5; ++i)
        {
            InventoryStorage[i] = new Dictionary <string, List <GameObject> >();
        }

        StorageRefs[(int)ItemTypeEnum.Misc]       = transform.Find("MiscStorage");
        StorageRefs[(int)ItemTypeEnum.Armor]      = transform.Find("ArmorStorage");
        StorageRefs[(int)ItemTypeEnum.Weapon]     = transform.Find("WeaponStorage");
        StorageRefs[(int)ItemTypeEnum.Consumable] = transform.Find("ConsumableStorage");
        StorageRefs[(int)ItemTypeEnum.Implant]    = transform.Find("ImplantStorage");

        CurrentWeight      = 0;
        EquippedConsumable = null;

        for (int j = 0; j < EquippedArmor.Length; ++j)
        {
            EquippedArmor[j] = null;
        }

        for (int j = 0; j < EquippedWeapons.Length; ++j)
        {
            EquippedWeapons[j] = null;
        }


        weaponController = GameObject.Find("Player").transform.Find("Body").GetComponent <WeaponController>();
        questsHolder     = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();
        playerStats      = GameObject.Find("Player").GetComponent <PlayerStats>();
    }
Ejemplo n.º 2
0
    void First_Start()
    {
        playerLoc    = GameObject.Find("Player").transform;
        playerIconUI = transform.Find("FullMapHolder").Find("PlayerLocation").GetComponent <RectTransform>();
        quests       = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();

        length = Worldmapsize / 2;

        MapCenter = new Vector2(TopPoint.x - length, TopPoint.y - length);
    }
Ejemplo n.º 3
0
    public void Setup(DiaPlayerLine TempChild)
    {
        TempChildStorage = TempChild;
        QH = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();
        TextMeshProUGUI textRef = transform.GetComponent <TextMeshProUGUI>();

        pressable = TempChild.Check_Accessible(textRef);

        diaParent = GameObject.Find("DialogueMenu").GetComponent <DiaParent>();
    }
Ejemplo n.º 4
0
    private void Start()
    {
        playerTrans = GameObject.Find("Player").transform;
        focus_light = focus_light_trans.GetComponent <Light>();
        quests      = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();
        SC          = GetComponent <SphereCollider>();
        rb          = GetComponent <Rigidbody>();
        cursorLogic = GameObject.Find("Master Object").GetComponent <CursorLogic>();

        focus_light_trans.localEulerAngles = new Vector3(focusLightAngle, 0f, 0f);
    }
    private void Awake()
    {
        eventQueue   = GameObject.Find("EventDisplay").GetComponent <EventQueue>();
        questsHolder = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();
        QHud         = GameObject.Find("QuestDisplay").GetComponent <QuestHUD>();
        ZF           = FindObjectOfType <Zone_Flags>();

        if (QuestName.Length > 27)
        {
            Debug.LogError("Either change QuestUI or Length of this QuestName. This will not look good in UI");
        }
    }
Ejemplo n.º 6
0
    private void Start()
    {
        player = GameObject.Find("Player").transform;
        inv    = player.GetComponentInChildren <Inventory>();
        AC     = player.GetComponentInChildren <AbilitiesController>();
        QH     = FindObjectOfType <QuestsHolder>();

        if (!Initialize_Default)
        {
            StartCoroutine("Load");
        }
    }
Ejemplo n.º 7
0
    void Start()
    {
        UIControl     = GameObject.Find("UI").GetComponent <UIController>();
        Player        = GameObject.Find("Player").transform;
        QH            = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();
        DC            = GameObject.Find("Drone").GetComponent <DroneController>();
        inventory     = Player.GetComponentInChildren <Inventory>();
        questTemplate = Quest.GetComponent <QuestTemplate>();

        TriggerLightsSegmented(GetFirstChildren(PrometheusToPallas), false);
        TriggerLightsSegmented(GetFirstChildren(PallasToEpimetheus), false);
        TriggerLightsSegmented(GetFirstChildren(EpimetheusToPrometheus), false);
        TriggerLights(TheRest.GetComponentsInChildren <MeshRenderer>(), false);
        TriggerLights(EntryLights.GetComponentsInChildren <MeshRenderer>(), false);
    }
Ejemplo n.º 8
0
    ////////////////////////////////////Public Usable Functions


    ////////////////////////////////////Protected Virtual Functions
    protected virtual void Start()
    {
        cc_immune       = false;
        timer           = 0f;
        player          = GameObject.Find("Player");
        Hitbox          = transform.Find("Hitbox");
        deadEnemyParent = GameObject.Find("DeadNPC").transform;

        AIenabled            = false;
        QH                   = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();
        rB                   = GetComponent <Rigidbody>();
        animator             = GetComponentInChildren <Animator>();
        animationUpdater     = GetComponentInChildren <EnemyAnimationUpdater>();
        agent                = GetComponent <NavMeshAgent>();
        agent.updatePosition = false;
        agent.updateRotation = false;
        health               = GetComponentInChildren <Health>();
        EHealBar             = GetComponentInChildren <EnemyHealthBar>();
        facLogic             = GameObject.Find("NPCs").GetComponent <FactionLogic>();

        agent.enabled  = true;
        original_speed = agent.speed;
    }
Ejemplo n.º 9
0
 protected virtual void Awake()
 {
     spawner_enabled = false;
     QH     = FindObjectOfType <QuestsHolder>();
     player = GameObject.Find("Player");
 }
Ejemplo n.º 10
0
    public string return_line()
    {
        QuestsHolder QH = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();

        Gesture();

        //Camera + Name
        List <Transform> targetTransforms = new List <Transform>();

        targetTransforms.Add(GameObject.Find("Player").transform);
        if (NPC_if_not_self)
        {
            FindObjectOfType <DiaParent>().Set_NPC_name(NPC_if_not_self.GetComponent <HumanoidMaster>().Return_Name());
            targetTransforms.Add(NPC_if_not_self.transform);
        }
        else
        {
            FindObjectOfType <DiaParent>().Set_NPC_name(GetComponentInParent <DiaRoot>().ReturnNPC_name());
            targetTransforms.Add(transform.parent);
        }

        CameraStateController camStateController = FindObjectOfType <CameraStateController>();

        camStateController.SetDiaTargetGroup(targetTransforms);
        //Camera + Name


        if (QuestTaskReturn)
        {
            QH.CheckTaskCompletion(QuestTaskReturn, quest_num);
            GetComponentInParent <DiaRoot>().Modify_diaCount(false);
        }

        if (Quest)
        {
            QH.AddQuest(Quest);
            Quest = null;
        }


        if (cycleLines)
        {
            string templine = Lines[currentLine];
            currentLine = (currentLine + 1) % Lines.Count;
            return(templine);
        }
        else if (cycleLinesNoWrapAround)
        {
            string templine = Lines[currentLine];
            if (currentLine < (Lines.Count - 1))
            {
                currentLine += 1;
            }
            return(templine);
        }
        else if (Lines.Count > 0)
        {
            return(Lines[0]);
        }
        else
        {
            return("");
        }
    }
 protected void Start()
 {
     QH = FindObjectOfType <QuestsHolder>();
     Recursive_Flag_Add(Master_Flags);
 }
 private void first_run_func()
 {
     QuestsHolder = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();
     First_run    = false;
 }