added gold mining system in test scene

This commit is contained in:
Lorenzo
2022-04-17 14:16:38 +02:00
parent 62a909795b
commit 7ea15eedf9
10 changed files with 2144 additions and 6541 deletions

View File

@@ -263,10 +263,10 @@ Material:
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Ground_Detail_Power: 1
- _Ground_Detail_Scale: 0.021
- _Ground_Detail_Scale: 0.058
- _Ground_Falloff: 5
- _Ground_Noise_Scale: 0.0181
- _Ground_Pebble_Scale: 0.0204
- _Ground_Pebble_Scale: 0.0284
- _MEtallic: 0.421
- _Metallic: 0
- _Mode: 0
@@ -276,7 +276,7 @@ Material:
- _RimPower1: 3.01
- _SmoothnessTextureChannel: 0
- _Snow: 0
- _Spec_Metallic: 0.254
- _Spec_Metallic: 0.064
- _Spec_Smoothness: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
@@ -307,7 +307,7 @@ Material:
- _RimColor1: {r: 0.1614143, g: 0.1380298, b: 0.8161765, a: 0}
- _Road_Colour: {r: 0.11372549, g: 0.003921569, b: 0.13333334, a: 1}
- _RockColour: {r: 0.17560555, g: 0.18834269, b: 0.20588237, a: 0}
- _Rock_Colour: {r: 0.11372549, g: 0.003921569, b: 0.13333334, a: 1}
- _Rock_Colour: {r: 0.25536156, g: 0.15331078, b: 0.2735849, a: 1}
- _Rock_Colour_Primary: {r: 0.11490278, g: 0.0058390982, b: 0.13235295, a: 0}
- _Rock_Colour_Secondary: {r: 0.11490278, g: 0.0058390982, b: 0.13235295, a: 0}
m_BuildTextureStacks: []

View File

@@ -23,7 +23,7 @@ Material:
m_Name: PolygonScifiWorlds_Mat_Plant_Basic_Green
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _EMISSION _NORMALMAP
m_LightmapFlags: 1
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
@@ -121,6 +121,6 @@ Material:
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 1.1604979, b: 0.13701369, a: 1}
- _EmissionColor: {r: 0, g: 0.84625983, b: 1.1604979, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@@ -4,12 +4,13 @@
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Skybox_Exp
m_Shader: {fileID: 4800000, guid: 5bf71ed386e3cf04e82f69b4a5770277, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 0
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
@@ -59,6 +60,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaCutoff: 0.5
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
@@ -85,8 +87,9 @@ Material:
- __dirty: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _ColorBottom: {r: 0.44117647, g: 1, b: 0.62279415, a: 0}
- _ColorBottom: {r: 0.25192344, g: 0.12944107, b: 0.33962262, a: 0}
- _ColorBottom1: {r: 0.35618514, g: 0.89705884, b: 0.60610616, a: 0}
- _ColorTop: {r: 1, g: 0.46323532, b: 0.46323532, a: 0}
- _ColorTop: {r: 0, g: 0.17295597, b: 0.254717, a: 0}
- _ColorTop1: {r: 1, g: 0.52129817, b: 0.41176468, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class MineScript : MonoBehaviour
{
[HideInInspector] public TMP_Text txt;
[HideInInspector] public TMP_Text gold;
private int goldAmount = 0;
private int totalAmount = 0;
public float refreshTime = 0.2f;
private void Start()
{
StartCoroutine(GetGoldTimer());
}
private IEnumerator GetGoldTimer()
{
while (true) {
yield return new WaitForSeconds(refreshTime);
goldAmount++;
UpdateGold();
}
}
private void UpdateGold()
{
gold.text = goldAmount.ToString();
}
public void CollectGold()
{
totalAmount = goldAmount + totalAmount;
txt.text = totalAmount.ToString();
goldAmount = 0;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5dba27881224bcc41b9ee7727935bdca
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -19,4 +19,4 @@ MonoBehaviour:
- name: Production rate
value: 10%
price: 8500
description: This is a mine
description: This is a gold mine

File diff suppressed because one or more lines are too long