public override void Left(Triggered o) { //Debug.Log("Sortie de la zone "+this.name+" par "+o.name); Ball b = o.GetComponent <Ball>(); if (o.GetType() == typeof(Unit)) { Unit u = (Unit)o; u.isInTryZone = false; u.HideButton(); } if (b != null) { b.inZone = null; //Debug.Log("ball zone : "+b.inZone); foreach (Unit u in b.Team) { u.HideButton(); } foreach (Unit u in b.Team.opponent) { u.HideButton(); } } }
public override void Entered(Triggered o) { Debug.Log("Entrée dans la zone de "+o.name); Ball b = o.GetComponent<Ball>(); if(o.GetType() == typeof(Unit)){ Unit u = (Unit)o; u.isInTryZone = true; //u.ShowButton("A"); } if (b != null) { b.Owner.ShowButton("A"); b.inZone = this; } }
public override void Entered(Triggered o) { //Debug.Log("Entrée dans la zone de "+o.name); Ball b = o.GetComponent <Ball>(); if (o.GetType() == typeof(Unit)) { Unit u = (Unit)o; u.isInTryZone = true; //u.ShowButton("A"); } if (b != null) { if (b.Owner != null) { b.Owner.ShowButton("A"); b.inZone = this; } } }
public override void Left(Triggered o) { Debug.Log("Sortie de la zone "+this.name+" par "+o.name); Ball b = o.GetComponent<Ball>(); if(o.GetType() == typeof(Unit)){ Unit u = (Unit)o; u.isInTryZone = false; u.HideButton(); } if (b != null) { b.inZone = null; Debug.Log("ball zone : "+b.inZone); foreach(Unit u in b.Team) { u.HideButton(); } foreach(Unit u in b.Team.opponent) { u.HideButton(); } } }