예제 #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "orangeMissile")
        {
            if (isOrange)
            {
                pointCounterScript.SetPoint(pointCounterScript.GetPoint() + 1);
            }
            else
            {
                pointCounterScript.SetPoint(pointCounterScript.GetPoint() - 4);
            }


            Destroy(other.gameObject);
        }
        if (other.gameObject.tag == "blueMissile")
        {
            if (!isOrange)
            {
                pointCounterScript.SetPoint(pointCounterScript.GetPoint() + 1);
            }
            else
            {
                pointCounterScript.SetPoint(pointCounterScript.GetPoint() - 4);
            }
            Destroy(other.gameObject);
        }
    }
 void takePoint()
 {
     pointScr.SetPoint(pointScr.GetPoint() - 30);
 }