void Start()
    {
        PM = GameObject.FindObjectOfType <PlayerMini>();


        bulletKeep = KeepMax;
    }
예제 #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);
    }
예제 #3
0
파일: Player.cs 프로젝트: jjcz123456/CardTK
 public bool equalsMini(PlayerMini other)
 {
     return (this.pId == other.pId && this.pType == other.pType);
 }