Ejemplo n.º 1
0
	void Start () {
		for (int i =1; i< level; i++) {
			sco+=i*100;
		}

		bb = new GUIStyle();
		bb.normal.background = null;    //这是设置背景填充的
		bb.normal.textColor=new Color(1,0,0);   //设置字体颜色的
		bb.fontSize = 50;       //当然,这是字体颜色

		aa = new GUIStyle();
		aa.normal.background = null;    //这是设置背景填充的
		aa.normal.textColor=new Color(1,0,0);   //设置字体颜色的
		aa.fontSize = 30;       //当然,这是字体颜色


		level15.Initial ();
		InitBgSrc ();//动态加载物体
		GameObject heroobj = GameObject.Find ("hero"); //调用脚本background中的地图
		heroscript = (hero15)heroobj.GetComponent (typeof(hero15));

		GameObject moneyobj = GameObject.Find ("enemy"); //调用脚本background中的地图
		moneyscript = (monkey15)moneyobj.GetComponent (typeof(monkey15));

		GameObject startspt = GameObject.Find ("startbtn"); //调用脚本background中的地图
		stspt = (startscript)startspt.GetComponent (typeof(startscript));
	}
Ejemplo n.º 2
0
    void Start()
    {
        for (int i = 1; i < level; i++)
        {
            sco += i * 100;
        }

        bb = new GUIStyle();
        bb.normal.background = null;               //这是设置背景填充的
        bb.normal.textColor  = new Color(1, 0, 0); //设置字体颜色的
        bb.fontSize          = 50;                 //当然,这是字体颜色

        aa = new GUIStyle();
        aa.normal.background = null;               //这是设置背景填充的
        aa.normal.textColor  = new Color(1, 0, 0); //设置字体颜色的
        aa.fontSize          = 30;                 //当然,这是字体颜色


        level15.Initial();
        InitBgSrc();                                  //动态加载物体
        GameObject heroobj = GameObject.Find("hero"); //调用脚本background中的地图

        heroscript = (hero15)heroobj.GetComponent(typeof(hero15));

        GameObject moneyobj = GameObject.Find("enemy");          //调用脚本background中的地图

        moneyscript = (monkey15)moneyobj.GetComponent(typeof(monkey15));

        GameObject startspt = GameObject.Find("startbtn");          //调用脚本background中的地图

        stspt = (startscript)startspt.GetComponent(typeof(startscript));
    }
Ejemplo n.º 3
0
	// Use this for initialization
	void Start () {
		GameObject backgd = GameObject.Find ("background"); //调用脚本background中的地图
		bg = (background15)backgd.GetComponent (typeof(background15));

		GameObject heroobj = GameObject.Find ("hero"); //调用脚本background中的地图
		heroscript = (hero15)heroobj.GetComponent (typeof(hero15));
		
		GameObject moneyobj = GameObject.Find ("enemy"); //调用脚本background中的地图
		moneyscript = (monkey15)moneyobj.GetComponent (typeof(monkey15));
	}
Ejemplo n.º 4
0
	// Use this for initialization
	void Start () {
		GameObject backgd = GameObject.Find ("background"); //调用脚本background中的地图
		bg = (background15)backgd.GetComponent (typeof(background15));

		GameObject moneyobj = GameObject.Find ("enemy"); //调用脚本background中的地图
		monkeyscript = (monkey15)moneyobj.GetComponent (typeof(monkey15));

		astar = new AStar();
		animator = GetComponent<Animator> ();
		hasdone = 1;
	}
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        GameObject backgd = GameObject.Find("background");          //调用脚本background中的地图

        bg = (background15)backgd.GetComponent(typeof(background15));

        GameObject heroobj = GameObject.Find("hero");          //调用脚本background中的地图

        heroscript = (hero15)heroobj.GetComponent(typeof(hero15));

        GameObject moneyobj = GameObject.Find("enemy");          //调用脚本background中的地图

        moneyscript = (monkey15)moneyobj.GetComponent(typeof(monkey15));
    }
Ejemplo n.º 6
0
    // Use this for initialization
    void Start()
    {
        GameObject backgd = GameObject.Find("background");          //调用脚本background中的地图

        bg = (background15)backgd.GetComponent(typeof(background15));

        GameObject moneyobj = GameObject.Find("enemy");          //调用脚本background中的地图

        monkeyscript = (monkey15)moneyobj.GetComponent(typeof(monkey15));

        astar    = new AStar();
        animator = GetComponent <Animator> ();
        hasdone  = 1;
    }