-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agora os itens coletados aparecem na galeria
Faltam ajustes como: zerar toda vez que se reseta o save (opcao que foi retirada diga-ee de passagem). Falta adicionar alguns itens, acho.
- Loading branch information
1 parent
11ac0d9
commit a3ca8ab
Showing
26 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class TreasureList : MonoBehaviour { | ||
|
||
[SerializeField] private SO_PlayerData _playerData; | ||
[SerializeField] private List<GameObject> _itemList; | ||
|
||
private void Start(){ | ||
int total = _itemList.Count; | ||
print(total); | ||
for(int i = 0;i<total;i++){ | ||
_itemList[i].GetComponent<Selectable>().interactable = _playerData.collectedItems[i]; | ||
print("i: "+i+"item: "+_playerData.collectedItems[i]); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
[CreateAssetMenu(menuName = "Custom/PlayerData")] | ||
public class SO_PlayerData : ScriptableObject { | ||
const int itemQuantity = 20; | ||
public bool[] collectedItems = new bool[itemQuantity]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class GalleryItem : MonoBehaviour { | ||
|
||
public void ShowDescription(){ | ||
GameObject.Find("Text_Box").transform.GetChild(0).GetComponent<Text>().text = GetComponent<Gem>().gemData.name; | ||
GameObject.Find("Text_Box").transform.GetChild(1).GetComponent<Text>().text = GetComponent<Gem>().gemData.description; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.