Crown Placement and Start of Game
Lisez pas mes commits svp T_T
This commit is contained in:
parent
c2af70eeb4
commit
e805b7eb9c
13 changed files with 4399 additions and 3688 deletions
|
@ -6,13 +6,15 @@ public class Crown : MonoBehaviour
|
|||
{
|
||||
|
||||
public event Action OnClicked;
|
||||
private bool crowned=false;
|
||||
public bool crowned=false;
|
||||
[SerializeField] TextMeshProUGUI texte;
|
||||
|
||||
|
||||
[SerializeField] private Camera _camera;
|
||||
[SerializeField] private LayerMask placementLayer;
|
||||
|
||||
[SerializeField] private GameObject startButton;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
texte.enabled = false;
|
||||
|
@ -40,6 +42,8 @@ public class Crown : MonoBehaviour
|
|||
if (Physics.Raycast(ray, out hit, 100, placementLayer))
|
||||
{
|
||||
OnClicked -= Crowning;
|
||||
crowned = true;
|
||||
startButton.SetActive(true);
|
||||
return hit.transform.gameObject;
|
||||
}
|
||||
else
|
||||
|
|
17
Assets/Scripts/StartGame.cs
Normal file
17
Assets/Scripts/StartGame.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class StartGame : MonoBehaviour
|
||||
{
|
||||
|
||||
[SerializeField] GameObject ShopUI;
|
||||
[SerializeField] GameObject GameUI;
|
||||
|
||||
public void Starting()
|
||||
{
|
||||
GameManager.Instance.StartFightForAll();
|
||||
GameUI.SetActive(true);
|
||||
GameUI.GetComponent<GameUI>().timerActive = true;
|
||||
ShopUI.SetActive(false);
|
||||
}
|
||||
|
||||
}
|
2
Assets/Scripts/StartGame.cs.meta
Normal file
2
Assets/Scripts/StartGame.cs.meta
Normal file
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 80a056dd50b538342a641ab274b8e7aa
|
|
@ -7,12 +7,11 @@ using System;
|
|||
public class UnitButton : MonoBehaviour
|
||||
{
|
||||
|
||||
[SerializeField] private GameObject Mask;
|
||||
|
||||
[SerializeField] GameObject unitPrefab;
|
||||
[SerializeField] UnitPlacement unitPlacement;
|
||||
public event Action OnClicked, OnExit;
|
||||
private bool clicked;
|
||||
|
||||
|
||||
private int cost;
|
||||
[SerializeField] TextMeshProUGUI texteCout;
|
||||
|
@ -35,7 +34,6 @@ public class UnitButton : MonoBehaviour
|
|||
{
|
||||
Debug.Log("I'm *in");
|
||||
|
||||
//Mask.SetActive(true);
|
||||
|
||||
OnClicked += PlaceUnit;
|
||||
OnExit += StopPlacing;
|
||||
|
@ -54,7 +52,6 @@ public class UnitButton : MonoBehaviour
|
|||
|
||||
public void StopPlacing()
|
||||
{
|
||||
//Mask.SetActive(false);
|
||||
OnClicked -= PlaceUnit;
|
||||
OnExit -= StopPlacing;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public static class GlobalsVariable
|
|||
{ "Zombie",1 },
|
||||
{ "Squelette",2 },
|
||||
{ "Creeper",3 },
|
||||
{ "Sorcière",3 },
|
||||
{ "Sorciere",3 },
|
||||
{ "Golem",8 }
|
||||
};
|
||||
|
||||
|
|
|
@ -54,13 +54,13 @@ public class HealthHandler : MonoBehaviour
|
|||
GlobalsVariable.AliveUnitsTeamB = new List<AbstractUnit>();
|
||||
GlobalsVariable.AliveUnitsTeamA = new List<AbstractUnit>();
|
||||
|
||||
if (deathState == DeathSate.QueenADead)
|
||||
if (deathState == DeathSate.QueenBDead)
|
||||
{
|
||||
print("get good, reload current scene");
|
||||
SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().name);
|
||||
}
|
||||
|
||||
if (deathState == DeathSate.QueenBDead)
|
||||
if (deathState == DeathSate.QueenADead)
|
||||
{
|
||||
print("GG going to next scene");
|
||||
GameManager.Instance.GoNextLevel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue