// Use this for initialization void Start() { Player = GameObject.FindGameObjectWithTag("Player"); stairs = GameObject.FindGameObjectWithTag("stairs"); charch_controler = Player.GetComponent <CharacterController>(); autowalk = Player.GetComponent <AutoWalk>(); }
public CrossGate(Memo memo) : base(memo) { Actions = new Actions(memo); Cheater = new Cheater(memo); Player = new Player(memo); Stuffs = new StuffList(memo); Combat = new Combat(this); AutoCure = new AutoCure(this); Contacts = new ContactList(memo); Pets = new PetList(memo); Items = new ItemList(this); AutoFood = new AutoFood(this); AutoNurse = new AutoNurse(this); PetCatch = new PetCatch(this); Producer = new Producer(this); AutoCombat = new AutoCombat(this); AutoWalk = new AutoWalk(this); Script = Script.GetNewTownInstance(this); Poster = new Poster(this); AutoChange = new AutoChange(this); MoveScript = new MoveScript(this); Cheater.YiDongJiaSu = true; }
void Start() { allFood = GameObject.FindGameObjectsWithTag("Food"); foodRemaining = allFood.Length; Debug.Log("There are " + foodRemaining + " food in this game."); if (playerAutoWalk == null) { playerAutoWalk = GameObject.Find("Player").GetComponent <AutoWalk> (); } if (catMeshAgents == null) { catMeshAgents = new List <NavMeshAgent> (); GameObject[] cats = GameObject.FindGameObjectsWithTag("Cat"); foreach (GameObject cat in cats) { catMeshAgents.Add(cat.GetComponent <NavMeshAgent> ()); } } }
void Start() { allFood = GameObject.FindGameObjectsWithTag ("Food"); foodRemaining = allFood.Length; Debug.Log ("There are " + foodRemaining + " food in this game."); if (playerAutoWalk == null) playerAutoWalk = GameObject.Find ("Player").GetComponent<AutoWalk> (); if (catMeshAgents == null) { catMeshAgents = new List<NavMeshAgent> (); GameObject[] cats = GameObject.FindGameObjectsWithTag ("Cat"); foreach (GameObject cat in cats) { catMeshAgents.Add (cat.GetComponent<NavMeshAgent> ()); } } }
// Use this for initialization void Start() { Player = GameObject.FindGameObjectWithTag("Player"); stairs = GameObject.Find("stairs"); autowalk = Player.GetComponent <AutoWalk>(); }