Example #1
0
	void Awake ()
	{
		goal = GameObject.FindGameObjectWithTag ("Goal");
		tile_grid = GameObject.FindGameObjectWithTag ("TileGrid").GetComponent<TileGrid> ();
		
		m_animator = GetComponent<Animator> ();
		m_mobSound = GetComponent<MobSound> ();
		goal_position = transform.position;
	}
Example #2
0
    void Awake()
    {
        base.Awake();
        _sound = GetComponent <MobSound>();
        GameManager manager = FindObjectOfType <GameManager>();

        manager.mobs.Add(this);
        _target    = manager.chicken.transform;
        _rigidbody = GetComponent <Rigidbody>();
    }