Skip to content
Snippets Groups Projects
Commit ce85fdb9 authored by NIEDERBERGER-VIALLE LEO's avatar NIEDERBERGER-VIALLE LEO
Browse files

Merge branch 'travail' into 'main'

Inventaire shop

See merge request !84
parents c235f871 83021f17
1 merge request!84Inventaire shop
......@@ -194,6 +194,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 36ca25de739aa4df6bed9378b2160889, type: 3}
m_Name:
m_EditorClassIdentifier:
qttSlot: 0
panelInfosVente: {fileID: 0}
--- !u!1 &6623190799052435214
GameObject:
m_ObjectHideFlags: 0
......@@ -229,7 +231,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -25.46, y: 16.5}
m_AnchoredPosition: {x: -29.4, y: 10.4}
m_SizeDelta: {x: 50.92, y: 33}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3017490613978890772
......@@ -271,8 +273,8 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4280235341
m_fontColor: {r: 0.3018868, g: 0.20784621, b: 0.12103952, a: 1}
rgba: 4280371569
m_fontColor: {r: 0.4433962, g: 0.28665766, b: 0.13134566, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
......@@ -289,15 +291,15 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 28
m_fontSizeBase: 28
m_fontSize: 35
m_fontSizeBase: 35
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_fontStyle: 17
m_HorizontalAlignment: 4
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
......@@ -325,7 +327,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 13.478508, w: 10.496745}
m_margin: {x: -15.242363, y: 0, z: -0.3249874, w: 10.496745}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
......
......@@ -16,6 +16,8 @@ namespace game
public static AllSeedPlant dicoPlant;
public static AllTools dicoTool;
public static Inventory shopInv;
// Start is called before the first frame update
void Awake()
{
......@@ -29,6 +31,12 @@ namespace game
mainInventory.addToInventory(dicoPlant.createSeed(EnumTypePlant.AJOS), 100);
mainInventory.addToInventory(dicoPlant.createPlant(EnumTypePlant.AJOS), 100);
shopInv = new Inventory();
shopInv.addToInventory(dicoPlant.createSeed(EnumTypePlant.ELB), 999);
shopInv.addToInventory(dicoPlant.createSeed(EnumTypePlant.EGRO), 999);
shopInv.addToInventory(dicoPlant.createSeed(EnumTypePlant.AJOS), 999);
shopInv.addToInventory(dicoPlant.createSeed(EnumTypePlant.AZLOC), 999);
/*
Debug.Log(dicoPlant.ToString());
Debug.Log(dicoTool.ToString());
......
......@@ -132,7 +132,10 @@ namespace game
{
if (text.gameObject.transform.parent != null)
{
text.SetText(slotText.ToString());
if (panelAInitialiser.name == "Money")
text.SetText(slotText.ToString() + "$");
else
text.SetText(slotText.ToString());
}
}
......
......@@ -116,6 +116,7 @@ namespace game
public void Affiche()
{
Debug.Log("J'affiche !!!!");
panel.afficheInventory(CreateAllSeedPlant.mainInventory.getInventory());
}
......@@ -124,7 +125,10 @@ namespace game
public void Affiche(Transform panelAvecInfos)
{
panel.afficheInventory(CreateAllSeedPlant.mainInventory.getInventory(), panelAvecInfos);
if (PanelInventory.name == "Shop")
panel.afficheInventory(CreateAllSeedPlant.shopInv.getInventory(), panelAvecInfos);
else
panel.afficheInventory(CreateAllSeedPlant.mainInventory.getInventory(), panelAvecInfos);
}
}
}
......@@ -136,7 +136,7 @@ public class PlotEvents : MonoBehaviour
{
return;
}
if (growthStatus == growthTime)
if (growthStatus == growthTime && growthStatus > 0)
recupPlante();
else if (!contientGraine)
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment