Ejemplo n.º 1
0
    void Start()
    {
        PM = GameObject.FindObjectOfType <PlayerMini>();


        bulletKeep = KeepMax;
    }
Ejemplo n.º 2
0
    void Start()
    {
        rb = GetComponent <Rigidbody2D>();
        SoundManagerScript.PlaySound(SoundManagerScript.EnemyBullet);
        player = GameObject.FindGameObjectWithTag("Player_Mini").transform;

        if (player != null)
        {
            PM = GameObject.FindObjectOfType <PlayerMini>();
        }
        targetDirection = (PM.transform.position - transform.position).normalized * speed;
        rb.velocity     = new Vector2(targetDirection.x, targetDirection.y);
    }
Ejemplo n.º 3
0
 public bool equalsMini(PlayerMini other)
 {
     return (this.pId == other.pId && this.pType == other.pType);
 }