Mirror intergrated, WIP on Client Prediction v1

This commit is contained in:
Sewmina
2022-06-14 01:57:42 +05:30
parent 4435d769a6
commit cdaa627f52
14571 changed files with 4207871 additions and 4127496 deletions

View File

@@ -1,39 +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");
}
}
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");
}
}