Example #1
0
 // Update is called once per frame
 void Update()
 {
     waitUpdate += 1;
     waitUpdate %= 10;
     if (waitUpdate == 1)
     {
         StaticManager.updateAvailableStage();
         getStaticData();
         updateMaterial();
     }
     if (onMouse)
     {
         if (Input.GetMouseButtonDown(0) && StaticManager.stageAvailable[level - 1, stage - 1])
         {
             if (stageExist && !Input.GetKey(KeyCode.LeftShift))
             {
                 string stageName = "Stage-" + level.ToString() + "," + stage.ToString();
                 TitlePhaseController.phase = "Game";
                 CameraFade.StartAlphaFade(Color.white, false, 1f, 0f, () => { Application.LoadLevel(stageName); });
             }
             else
             {
                 StaticManager.stageClear[level - 1, stage - 1] = true;
                 StaticManager.saveData();
             }
         }
     }
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        GameMan = GameObject.Find("GameManager");
        GM      = GameMan.transform.GetComponent <GameManager> ();

        StaticManager.stageClear [GM.level - 1, GM.stage - 1] = true;
        StaticManager.saveData();

        time      = Mathf.FloorToInt(GM.milTime);
        getCranes = GM.getCranes;
        cranes    = GM.cranes;
        score     = string.Format("TIME {0}min{1}sec\nCRANE {2} / {3}", time / 60, time % 60, getCranes, cranes);
        Text text = transform.GetComponent <Text>();

        try{
            text.text = score;
        }catch {
        }
    }