update
This commit is contained in:
@@ -2499,7 +2499,6 @@ GameObject:
|
||||
- component: {fileID: 197904217}
|
||||
- component: {fileID: 197904218}
|
||||
- component: {fileID: 197904220}
|
||||
- component: {fileID: 197904221}
|
||||
- component: {fileID: 197904222}
|
||||
- component: {fileID: 197904223}
|
||||
- component: {fileID: 197904224}
|
||||
@@ -2563,18 +2562,6 @@ MonoBehaviour:
|
||||
hely1: {fileID: 1620774317}
|
||||
hely2: {fileID: 921900544}
|
||||
valasztottErtek: 0
|
||||
--- !u!114 &197904221
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 197904216}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7187ff75d86420a4981438f408c7dfd6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &197904222
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
8
Assets/Scripts/Akciok.cs
Normal file
8
Assets/Scripts/Akciok.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Akciok : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
11
Assets/Scripts/Akciok.cs.meta
Normal file
11
Assets/Scripts/Akciok.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 685439a2c4b9c0f48b19d24c85561120
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -9,6 +9,7 @@ public class Dice : MonoBehaviour {
|
||||
|
||||
private Upgrade upgrade;
|
||||
private Akciopont ap;
|
||||
private Energia energiasav;
|
||||
|
||||
private int[] diceResult = { 0, 0 };
|
||||
public int valasztottErtek; //a jatekos altal valasztott dobott ertek helye
|
||||
@@ -24,6 +25,7 @@ public class Dice : MonoBehaviour {
|
||||
private void Start() {
|
||||
upgrade = FindObjectOfType<Upgrade>();
|
||||
ap = FindObjectOfType<Akciopont>();
|
||||
energiasav = FindObjectOfType<Energia>();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +34,9 @@ public class Dice : MonoBehaviour {
|
||||
if (gomb.name == "dice1btn") {
|
||||
valasztottErtek = diceResult[0];
|
||||
if (diceResult[0] < diceResult[1]) {
|
||||
upgrade.canUpgrade = true;
|
||||
upgrade.canUpgrade = true; //kisebb szam valasztasa eseten fejlesztes egyszer
|
||||
} else {
|
||||
energiasav.csokkenEnergia(); //nagyobb szam valasztasa eseten -1 energia
|
||||
}
|
||||
|
||||
//a valasztott szam atirasa az akcio mezobe
|
||||
@@ -44,6 +48,8 @@ public class Dice : MonoBehaviour {
|
||||
valasztottErtek = diceResult[1];
|
||||
if (diceResult[1] < diceResult[0]) {
|
||||
upgrade.canUpgrade = true;
|
||||
} else {
|
||||
energiasav.csokkenEnergia();
|
||||
}
|
||||
|
||||
//a valasztott szam atirasa az akcio mezobe
|
||||
|
||||
Reference in New Issue
Block a user