Exemplo n.º 1
0
    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();
            }
        }
    }
Exemplo n.º 2
0
    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;
        }
    }
Exemplo n.º 3
0
    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;
            }
        }
    }
Exemplo n.º 4
0
    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();
            }
        }
    }