Exemple #1
0
 void Awake()
 {
     S             = this;
     linea         = GetComponent <LineRenderer> ();
     linea.enabled = false;
     puntos        = new List <Vector3> ();
 }
Exemple #2
0
    /// <summary>
    ///  Destroy gameObject and generates the explosion
    /// </summary>
    public void Explote()
    {
        GameObject exp = Instantiate(explosion);

        exp.transform.position = transform.position;
        Estela estela = exp.GetComponent <Estela>();

        estela.Ratio = radio;
        estela.Owner = Owner;

        map.ThingChange(new message("Bomb", pos, message.Erase));
        map.ThingChange(new message("Ratio", radio, message.Erase));
        map.SendMessage("BlockDestroyed", pos);
        Destroy(gameObject);
    }