// Start is called before the first frame update
 void Start()
 {
     NinjaP      = GameObject.Find("Ninja Points").GetComponent <Text>();
     NinjaP.text = "Ninja Points: ";
     m_InvScript = FindObjectOfType <Inventory_JoaoBeijinho>();
     m_LeftClick = FindObjectOfType <PlayerController_JamieG>();
     wpnUI       = GameObject.Find("WeaponsUI").GetComponent <WeaponUI_LouieWilliamson>();
 }
Пример #2
0
    public void SaveGameState()
    {
        GameObject player = GameObject.Find("Player");

        if (player != null)
        {
            Inventory_JoaoBeijinho inventory = player.GetComponent <Inventory_JoaoBeijinho>();
            SaveLoadSystem_JamieG.SaveInventory(inventory);

            SaveLoadSystem_JamieG.SaveGameplay(
                SceneManager.GetActiveScene().buildIndex,
                GameObject.FindGameObjectsWithTag("Enemy"),
                new GameObject[0]//GameObject.FindGameObjectsWithTag("Door")
                );
        }
    }
Пример #3
0
    private void Start()
    {
        m_pathfinder        = GameObject.FindObjectOfType <Pathfinder_SebastianMol>();
        m_scale             = transform.localScale.x;
        m_lastPos           = transform.position;
        m_startPos          = transform.position;
        m_patrolIteratorMax = m_patrolPoints.Length - 1;
        m_patroleTimer      = m_deleyBetweenPatrol;
        if (m_patrolPoints.Length > 0)
        {
            m_currentPatrolePos = m_patrolPoints[0];
        }
        m_lookLeftAndRightTimerMax = m_lookLeftAndRightTimer;
        m_maxHealth       = m_health;
        m_outOfSightTimer = m_outOfSightDeley;
        m_maxAttackRange  = m_attackRange;

        m_inventory           = GameObject.Find("Player").GetComponent <Inventory_JoaoBeijinho>();
        m_playerStealthScript = FindObjectOfType <PlayerStealth_JoaoBeijinho>();
        m_HitEffectElliott    = GetComponent <HitEffectElliott>();
        m_cameraShake         = Camera.main.GetComponent <CameraShakeElliott>();
    }
Пример #4
0
 private void Awake()
 {
     m_Inventory = FindObjectOfType <Inventory_JoaoBeijinho>();
 }
    //void UIEnable()
    //{
    //    if (!gameObject.activeInHierarchy)
    //    {
    //        foreach (var UI_object in m_UI)
    //        {
    //            UI_object.SetActive(true);

    //        }
    //    }
    //}

    void Start()
    {
        Inventory = GameObject.FindObjectOfType <Inventory_JoaoBeijinho>();
        Inventory.GiveItem(ItemType.NinjaPoints, 40);
    }
Пример #6
0
    // Saves the current items in the inventory into the Inventory.save file
    public static void SaveInventory(Inventory_JoaoBeijinho inventory)
    {
        InventoryData inventoryData = new InventoryData(inventory);

        SaveToFile(InventoryFile, inventoryData);
    }
Пример #7
0
 void Start()
 {
     m_inventory = FindObjectOfType <Inventory_JoaoBeijinho>();
     weaponUI    = GameObject.Find("WeaponsUI").GetComponent <WeaponUI_LouieWilliamson>();
 }