UI's added, shop and basic currency are done, BUGS: can move around the map when scrolling shop, object do not get selected
This commit is contained in:
@@ -23,6 +23,7 @@ TextureImporter:
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
@@ -31,9 +32,9 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
@@ -54,9 +55,12 @@ TextureImporter:
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
|
||||
153
Assets/Assets/GUI Kit - Mono Round/Scenes/Icon_Frame.prefab
Normal file
153
Assets/Assets/GUI Kit - Mono Round/Scenes/Icon_Frame.prefab
Normal file
@@ -0,0 +1,153 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1326481212533908627
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1326481212533908624}
|
||||
- component: {fileID: 1326481212533908630}
|
||||
- component: {fileID: 1326481212533908625}
|
||||
m_Layer: 5
|
||||
m_Name: Icon
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1326481212533908624
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1326481212533908627}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1326481213844969923}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 76, y: 112}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1326481212533908630
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1326481212533908627}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &1326481212533908625
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1326481212533908627}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 41cc64edcb10c48819942e5030958271, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &1326481213844969922
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1326481213844969923}
|
||||
- component: {fileID: 1326481213844969921}
|
||||
- component: {fileID: 1326481213844969920}
|
||||
m_Layer: 5
|
||||
m_Name: Icon_Frame
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1326481213844969923
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1326481213844969922}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1326481212533908624}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1326481213844969921
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1326481213844969922}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &1326481213844969920
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1326481213844969922}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 4e364452810f5456fbed36f91ba318d4, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac36a9d7619adc0439a07cd21a83560d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1229
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Common.prefab
Normal file
1229
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Common.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87cf0c9e3a82e654f8bef4518fd59821
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
4587
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Settings.prefab
Normal file
4587
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Settings.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0187899539ea6674c97071bead197893
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6189
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Shop_Coin.prefab
Normal file
6189
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Shop_Coin.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6551519d4357324cb9959fcdb6ef3b2
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6191
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Shop_Gem.prefab
Normal file
6191
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Shop_Gem.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e6c57c5cb1a83e47b57f539562f2e65
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3987
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Shop_Life.prefab
Normal file
3987
Assets/Assets/GUI Kit - Mono Round/Scenes/Popup_Shop_Life.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfa4fb43dd813724d957ff347f47e64c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -13,9 +13,10 @@ namespace LayerLab
|
||||
for (int i = 0; i < otherPanels.Length; i++) otherPanels[i].SetActive(true);
|
||||
}
|
||||
|
||||
public void OnDisable()
|
||||
/* public void OnDisable()
|
||||
{
|
||||
for (int i = 0; i < otherPanels.Length; i++) otherPanels[i].SetActive(false);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
18
Assets/Game/Scripts/GemsManager.cs
Normal file
18
Assets/Game/Scripts/GemsManager.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GemsManager : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Game/Scripts/GemsManager.cs.meta
Normal file
11
Assets/Game/Scripts/GemsManager.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b195fdb5ea64a0749995a2bb337f6557
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
39
Assets/Game/Scripts/GetPrice.cs
Normal file
39
Assets/Game/Scripts/GetPrice.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
public class GetPrice : MonoBehaviour
|
||||
{
|
||||
public TMP_Text mytext;
|
||||
public TMP_Text gemsText;
|
||||
private float gemsAmount;
|
||||
private float updatedPrice = 0f;
|
||||
private float price = 0f;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
updatedPrice = gemsAmount - price;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void getPrice()
|
||||
{
|
||||
if(updatedPrice >= price){
|
||||
price = float.Parse(mytext.text);
|
||||
gemsAmount = float.Parse(gemsText.text);
|
||||
|
||||
updatedPrice = gemsAmount - price;
|
||||
gemsText.text = updatedPrice.ToString();
|
||||
}
|
||||
else Debug.Log("Not enough gems");
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Game/Scripts/GetPrice.cs.meta
Normal file
11
Assets/Game/Scripts/GetPrice.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44e7ddb03d9043a4aae9f274b6cae07f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Assets/Game/Scripts/ShopScript.cs
Normal file
34
Assets/Game/Scripts/ShopScript.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class ShopScript : MonoBehaviour
|
||||
{
|
||||
public GameObject shopUI;
|
||||
public GameObject GemsMenu;
|
||||
public string shopButtonName;
|
||||
|
||||
|
||||
public void openShop()
|
||||
{
|
||||
shopButtonName = EventSystem.current.currentSelectedGameObject.name;
|
||||
checkButton();
|
||||
|
||||
}
|
||||
|
||||
public void checkButton()
|
||||
{
|
||||
switch (shopButtonName)
|
||||
{
|
||||
case "Button_Shop": shopUI.SetActive(true); break;
|
||||
case "Coin": shopUI.SetActive(true); GemsMenu.SetActive(false); break;
|
||||
case "Gem": GemsMenu.SetActive(true); shopUI.SetActive(false); break;
|
||||
}
|
||||
}
|
||||
public void closeShop()
|
||||
{
|
||||
shopUI.SetActive(false);
|
||||
GemsMenu.SetActive(false);
|
||||
}
|
||||
}
|
||||
11
Assets/Game/Scripts/ShopScript.cs.meta
Normal file
11
Assets/Game/Scripts/ShopScript.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca72ca0211b2f0a42bc9487337e10f10
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user