Ejemplo n.º 1
0
    IEnumerator Start()
    {
        player = GameObject.Find("player01").GetComponent <player01>();
        if (player.left)
        {
            direction = 1;
        }
        else
        {
            direction = -1;
        }
        transform.parent = null;
        blast_rb         = GetComponent <Rigidbody2D>();
        yield return(new WaitForSeconds(0.18f));

        player.strong     = false;
        blast_rb.velocity = new Vector2(speed * direction, blast_rb.velocity.y);
        Destroy(this.gameObject, 1);
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     player = GameObject.Find("player01").GetComponent <player01>();
 }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     line   = GetComponent <LineRenderer>();
     player = GameObject.Find("player01").GetComponent <player01>();
 }