Exemple #1
0
    // Use this for initialization
    void Start()
    {
        currentCraneState  = craneState_t.first_idle;
        cameras            = GetComponentsInChildren <Camera>(true);
        currentCameraState = cameraState_t.side;

        //grab global settings, video, sound, level settings, etc.
        gbSettings = GameObject.Find("Global Settings").GetComponent <GlobalSettings>();

        SetCamera();

        claw             = GetComponentInChildren <Claw>();
        claw.currentMode = gbSettings.settings.currentmode;
        claw.Init();

        SetupCallbacks();

        //get the player from the SQL database. until then use a placeholder
        currentPlayer = new PlayerInfo();

        //if strict mode, enable physics history
        if (gbSettings.settings.currentmode == Claw.gameMode.strict)
        {
            UpdateHistory();
        }

        currentLevel             = GetComponentInChildren <Level>();
        currentLevel.OnComplete += OnWin;

        SetupGUI();
        ;
    }
Exemple #2
0
 void ChangeState(craneState_t newState)
 {
     currentCraneState = newState;
 }