54 lines
1.2 KiB
C#
54 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UniRx;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.SceneManagement;
|
|
using UnityEngine.UI;
|
|
|
|
public class PopcornGameManager : MonoBehaviour
|
|
{
|
|
[SerializeField] private GameObject startingGuide;
|
|
// [SerializeField] private Text powerResultText;
|
|
[SerializeField] private Text gameResultText;
|
|
|
|
[SerializeField] private ThermalControl thermalControl;
|
|
[SerializeField] private ThermoMeter thermoMeter;
|
|
[SerializeField] private CornManager cornManager;
|
|
|
|
private Action tapAction;
|
|
private bool isProgress;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
gameResultText.text = "";
|
|
// startingGuide.SetActive(true);
|
|
isProgress = false;
|
|
|
|
thermalControl.Condition.Subscribe(x =>
|
|
{
|
|
cornManager.ChangeGrowSpeed(x);
|
|
}).AddTo(this);
|
|
|
|
ResetGame();
|
|
|
|
// タップ後スタート
|
|
StartGame();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
|
|
private void ResetGame()
|
|
{
|
|
thermalControl.ResetMeter();
|
|
cornManager.RespawnCorn();
|
|
}
|
|
|
|
private void StartGame()
|
|
{
|
|
}
|
|
}
|