Exemplo n.º 1
0
    void Start()       // Monobehavior start
    {
        logger      = UniLogger.GetLogger("GameCamera");
        feMain      = BeamMain.GetInstance();
        _thisCamera = (Camera)GetComponent("Camera");
        ModeNormal mode = (ModeNormal)SetMode(CamModeID.kNormal);

        mode.init(this);
    }
Exemplo n.º 2
0
    //
    // API
    //


    //
    // Utility
    //

    // Bike Factory stuff

    static public GameObject CreateBike(IBike ib, FeGround feGround)
    {
        GameObject newBike = GameObject.Instantiate(FrontendBikeFactory.GetInstance().bikePrefab, utils.Vec3(ib.basePosition), Quaternion.identity) as GameObject;

        newBike.AddComponent(bikeClassTypes[ib.ctrlType]);
        newBike.transform.parent = feGround.transform;
        FrontendBike bk = (FrontendBike)newBike.transform.GetComponent("FrontendBike");

        bk.Setup(ib, BeamMain.GetInstance().beamApp.mainGameInst);
        return(newBike);
    }
Exemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        userSettings = UserSettingsMgr.Load(kSettingsFileBaseName);
        //userSettings = BeamUserSettings.CreateDefault();
        userSettings.localPlayerCtrlType = BikeFactory.LocalPlayerCtrl; // Kinda hackly

        mainObj       = BeamMain.GetInstance();
        _feModeHelper = new BeamFeModeHelper(mainObj);
        feBikes       = new Dictionary <string, GameObject>();
        logger        = UniLogger.GetLogger("Frontend");
    }
Exemplo n.º 4
0
    public void LoadAndShow()
    {
        BeamMain         mainObj  = BeamMain.GetInstance();
        BeamUserSettings settings = mainObj.frontend.GetUserSettings();

        screenNameField.GetComponent <TMP_InputField>().text    = settings.screenName;
        p2pConnectionField.GetComponent <TMP_InputField>().text = settings.p2pConnectionString;
        ethNodeField.GetComponent <TMP_InputField>().text       = settings.ethNodeUrl;
        ethAcctField.GetComponent <TMP_InputField>().text       = settings.ethAcct;
        gameIdField.GetComponent <TMP_InputField>().text        =
            settings.tempSettings.ContainsKey("gameId") ? settings.tempSettings["gameId"] : "";

        UserSettingsMgr.Save(settings);

        moveOnScreen();
    }
Exemplo n.º 5
0
    public void SaveAndHide()
    {
        BeamMain         mainObj  = BeamMain.GetInstance();
        BeamUserSettings settings = mainObj.frontend.GetUserSettings();

        settings.screenName          = screenNameField.GetComponent <TMP_InputField>().text;
        settings.p2pConnectionString = p2pConnectionField.GetComponent <TMP_InputField>().text;
        settings.ethNodeUrl          = ethNodeField.GetComponent <TMP_InputField>().text;
        settings.ethAcct             = ethAcctField.GetComponent <TMP_InputField>().text;
        string gameId = gameIdField.GetComponent <TMP_InputField>().text;

        if (gameId != "")
        {
            settings.tempSettings["gameId"] = gameId;
        }

        UserSettingsMgr.Save(settings);

        moveOffScreen();
    }
Exemplo n.º 6
0
 // Use this for initialization
 protected override void Start()
 {
     base.Start();
     _main = BeamMain.GetInstance();
 }
Exemplo n.º 7
0
 // Use this for initialization
 protected void Start()
 {
     _main = BeamMain.GetInstance();
 }
Exemplo n.º 8
0
 // Use this for initialization
 protected void Start()
 {
     _main     = BeamMain.GetInstance();
     _playMenu = (PlayMenu)utils.findObjectComponent("PlayMenu", "PlayMenu");
 }