void Start() { g_shootingScriptObject = transform.Find("GunBarrelEnd").gameObject; // Create a layer mask for the floor layer. g_groundMask = LayerMask.GetMask("Ground"); // Set up references. //anim = GetComponent <Animator> (); g_health = g_maxHealth; life_bar.transform.Find("Text").GetComponent <Text>().text = g_health.ToString(); life_bar.transform.Find("Life").GetComponent <RectTransform>().anchorMax = new Vector2(1, 1); g_isDead = false; g_scorePoints = 0; g_isLootBoxSelected = false; g_selectLootBox = null; }
public void resetSelectedLootBox() { g_isLootBoxSelected = false; g_selectLootBox = null; }
public void setSelectedLootBox(GameObject p_lootBox) { g_isLootBoxSelected = true; g_selectLootBox = p_lootBox.GetComponent <LootBoxScript> (); }