예제 #1
0
파일: bullet.cs 프로젝트: seichter/Rockover
    void OnTriggerEnter2D(Collider2D hitInfo)
    {
        Paparazzi Paparazzi = hitInfo.GetComponent <Paparazzi>();

        if (Paparazzi != null)
        {
            Paparazzi.TakeDamage(damage);
        }
        Debug.Log(hitInfo);
        Destroy(gameObject);
    }
예제 #2
0
    void OnTriggerEnter2D(Collider2D hitInfo)
    {
        Paparazzi Paparazzi = hitInfo.GetComponent <Paparazzi>();

        if (Paparazzi != null)
        {
            Paparazzi.TakeDamage(damage);
        }
        Boss Boss = hitInfo.GetComponent <Boss>();

        if (Boss != null)
        {
            Boss.TakeDamage(damage);
        }
        Instantiate(Resources.Load("hitEffect"), transform.position, transform.rotation);
        Destroy(gameObject);
        Debug.Log(hitInfo);
    }
예제 #3
0
 public void Enter(Paparazzi paparazzi)
 {
     this.paparazzi   = paparazzi;
     paparazzi.Target = null;
 }
예제 #4
0
 public void Enter(Paparazzi paparazzi)
 {
     this.Paparazzi = paparazzi;
 }