StarSystem
Stars With switching positions (Bought stars are not saved or shown)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class LayoutBuyStarController : MonoBehaviour
|
||||
{
|
||||
public TMP_Text infoText;
|
||||
public GameObject buttonBuy, buttonNo;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f33e28d2770e17c49ba9886d0a37602c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -39,7 +39,7 @@ public class Star : MonoBehaviour
|
||||
|
||||
public void Buy(Player player)
|
||||
{
|
||||
player.coins -= cost;
|
||||
player.AddCoins(-cost);
|
||||
starController.SwitchStar();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user