示例#1
0
    // Use this for initialization
    void Start()
    {
        Instance = this;
        ball     = ball_hd;
        bug      = bug_hd;
        thePrefab.transform.localScale = new Vector3(0.67f, 0.58f, 1);
        Meshes = GameObject.Find("-Ball");
        LevelData.LoadDataFromXML(mainscript.Instance.currentLevel);

        createMesh();
        //LevelData.LoadDataFromLocal(mainscript.Instance.currentLevel);
        LoadMap(LevelData.map);
        if (LevelData.mode == ModeGame.Vertical || LevelData.mode == ModeGame.Animals)
        {
            MoveLevelUp();
        }
        else
        {
            // GameObject.Find( "TopBorder" ).transform.position += Vector3.down * 3.5f;
            GameObject.Find("TopBorder").transform.parent = null;
            GameObject.Find("TopBorder").GetComponent <SpriteRenderer>().enabled = false;
            GameObject ob = GameObject.Find("-Meshes");
            ob.transform.position += Vector3.up * 3f;
            LockLevelRounded slider = ob.AddComponent <LockLevelRounded>();
            GamePlay.Instance.GameStatus = GameState.PreTutorial;
        }
        Camera.main.GetComponent <mainscript>().connectNearBallsGlobal();
        StartCoroutine(getBallsForMesh());
        ShowBugs();
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     Instance  = this;
     staticPos = transform.position;
     newRot    = Quaternion.identity;
 }
 // Use this for initialization
 void Start()
 {
     Instance = this;
     newRot   = Quaternion.identity;
 }