Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        //Debug.Log((int)(1f / Time.unscaledDeltaTime));

        if (!initial_control_set)
        {
            initial_control_set = true;
            AssumeControl(controlled, controlled_handler);
        }

        if (!controlled_handler.PlayerCanCommand())
        {
            SwitchControl();

            if (!controlled_handler.PlayerCanCommand())
            {
                // defeat!
            }
        }

        game_camera_handler.FocusOn(controlled);

        controlled_handler.MakeFlashlightFacePoint(game_camera.ScreenToWorldPoint(Input.mousePosition));
    }