Esempio n. 1
0
    void Update()
    {
        transform.position = new Vector3(transform.position.x, pos.y, transform.position.z);

        if (visable && Time.time >= time)
        {
            visable          = false;
            gameObject.layer = 9;
            scrMngr.AddNearMiss(true);
        }

        // ---

        mouseX = Input.mousePosition.x;
        mouseY = Input.mousePosition.y;

        worldPos = camera.ScreenToWorldPoint(new Vector3(mouseX, mouseY, 3f));

        transform.LookAt(worldPos);

        if (mouseX > Screen.width / 2)
        {
            Screen.showCursor = true;
        }
        else
        {
            Screen.showCursor = false;
        }
    }
 void AddUp()
 {
     if (time > 5.0f)
     {
         scrMngr.AddNearMiss(false);
     }
     time = 0f;
 }