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