// Use this for initialization void Start () { GameObject backgd = GameObject.Find ("background"); //调用脚本background中的地图 bg = (background6)backgd.GetComponent (typeof(background6)); GameObject heroobj = GameObject.Find ("hero"); //调用脚本background中的地图 heroscript = (hero6)heroobj.GetComponent (typeof(hero6)); GameObject moneyobj = GameObject.Find ("enemy"); //调用脚本background中的地图 moneyscript = (monkey6)moneyobj.GetComponent (typeof(monkey6)); }
// Use this for initialization void Start () { GameObject backgd = GameObject.Find ("background"); //调用脚本background中的地图 bg = (background6)backgd.GetComponent (typeof(background6)); GameObject moneyobj = GameObject.Find ("enemy"); //调用脚本background中的地图 monkeyscript = (monkey6)moneyobj.GetComponent (typeof(monkey6)); astar = new AStar(); animator = GetComponent<Animator> (); hasdone = 1; }
// Use this for initialization void Start() { GameObject backgd = GameObject.Find("background"); //调用脚本background中的地图 bg = (background6)backgd.GetComponent(typeof(background6)); GameObject moneyobj = GameObject.Find("enemy"); //调用脚本background中的地图 monkeyscript = (monkey6)moneyobj.GetComponent(typeof(monkey6)); astar = new AStar(); animator = GetComponent <Animator> (); hasdone = 1; }
// Use this for initialization void Start() { GameObject backgd = GameObject.Find("background"); //调用脚本background中的地图 bg = (background6)backgd.GetComponent(typeof(background6)); GameObject heroobj = GameObject.Find("hero"); //调用脚本background中的地图 heroscript = (hero6)heroobj.GetComponent(typeof(hero6)); GameObject moneyobj = GameObject.Find("enemy"); //调用脚本background中的地图 moneyscript = (monkey6)moneyobj.GetComponent(typeof(monkey6)); }
public background6 bg; //调用脚本background中的地图 // Use this for initialization void Start() { GameObject backgd = GameObject.Find("background"); //调用脚本background中的地图 bg = (background6)backgd.GetComponent(typeof(background6)); }
public background6 bg;//调用脚本background中的地图 // Use this for initialization void Start () { GameObject backgd = GameObject.Find ("background"); //调用脚本background中的地图 bg = (background6)backgd.GetComponent (typeof(background6)); }