Ejemplo n.º 1
0
 public void StartGame()
 {
     Application.targetFrameRate = 60;
     GlobalCam.camWidth          = globalCamWidth;   // Sets the game camera
     GlobalCam.camHeigth         = globalCamHeigth;
     GlobalCam.useRearCam        = useRaerGlobalCam; // Use raer cam in this game
     GlobalCam.SetGlobalCam();
     //if (showCamScript != null)
     //    showCamScript.StartShowCam();
     playerScript.cam = GlobalCam.gameCam;
     ResetLevel();       // Resets game variables
     StartCoroutine(OnGame());
 }
    void SetPlayCam()
    {
        GlobalCam.camWidth   = globalCamWidth;
        GlobalCam.camHeigth  = globalCamHeigth;
        GlobalCam.useRearCam = useRaerGlobalCam;
        GlobalCam.SetGlobalCam();
        cam = GlobalCam.gameCam;
        ShowCam sc = GameObject.Find("Background").GetComponent <ShowCam>();

        if (sc != null)
        {
            sc.StartShowCam();
        }
    }
Ejemplo n.º 3
0
    public void CreateCarLocalGameCar(Vector3 pos)
    {
        GameObject    go      = Instantiate(CarPrefab, pos, Quaternion.identity);
        CarController control = go.GetComponent <CarController>();

        control.UserInputControl  = PlayerJoystick;
        PlayerJoystick.CarControl = control;
        PlayerBoostBtn.CarControl = control;

        GlobalCam.Reset(pos);
        GlobalCam.CameraTarget = control.CharacterObject.gameObject;

        GlobalGameState.IsPlayerDead = false;
    }