示例#1
0
 private void Start()
 {
     mainCanvas          = FindObjectOfType(typeof(Canvas)) as Canvas;
     uiManager           = UiManager.Instance;
     ballManager         = BallManager.Instance;
     touchControlManager = TouchControlManager.Instance;
 }
示例#2
0
    private void Start()
    {
        //gets instances
        gameEnvironmentSetUp = gameObject.AddComponent <GameEnvironmentSetUp>() as GameEnvironmentSetUp;
        touchControlManager  = TouchControlManager.Instance;

        //gets datas saved
        SaveLoad.Load();
        gameDatas = SaveLoad.gameDatas;

        WholePlatform = new GameObject("wholePlatform");

        PlatformCount = gameDatas.PlatformCount;

        //get harder point settings
        firstGetHarderPoint  = (PlatformCount * 25) / 100;
        secondGetHarderPoint = (PlatformCount * 50) / 100;
        thirdGetHarderPoint  = (PlatformCount * 75) / 100;

        PlatformSetUp();
        MakeControlPointForARing();
    }
示例#3
0
    private void Start()
    {
        //gets instances
        uiManager            = UiManager.Instance;
        gameManager          = GameManager.Instance;
        gameEnvironmentSetUp = gameObject.AddComponent <GameEnvironmentSetUp>() as GameEnvironmentSetUp;
        touchControlManager  = TouchControlManager.Instance;
        levelSettings        = gameObject.AddComponent <LevelSettings>();
        gameDatas            = new GameDatas();

        //get datas that is saved
        SaveLoad.Load();
        BestScore     = SaveLoad.gameDatas.BestScore;
        LevelCount    = SaveLoad.gameDatas.LevelCount;
        platformCount = SaveLoad.gameDatas.PlatformCount;

        targetForCamera = GameObject.FindWithTag("targetForCamera");
        mainCanvas      = FindObjectOfType(typeof(Canvas)) as Canvas;

        //calculates initial distance between ball and targetForCamera object
        targetOffset = targetForCamera.transform.position - transform.position;

        bestScoreObject = mainCanvas.transform.Find("bestScore").gameObject;
    }