Example #1
0
    void Start()
    {
        bombShot  = GetComponent <Transform>();
        player    = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>();
        pause     = GameObject.FindGameObjectWithTag("Manager").GetComponent <PauseManager>();
        boss      = GameObject.FindGameObjectWithTag("Boss").GetComponent <Boss1Behaviour>();
        playerPos = player.transform.position;
        direction = (new Vector2(playerPos.x, playerPos.y + 1) - new Vector2(this.transform.position.x, this.transform.position.y)).normalized;

        Destroy(this.gameObject, 5f);
    }
Example #2
0
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterBehaviour>();
     boss   = GameObject.FindGameObjectWithTag("Boss").GetComponent <Boss1Behaviour>();
 }