// Update is called once per frame void FixedUpdate() { if(player==null) { player = GameObject.FindGameObjectWithTag("Player"); resources = player.GetComponent<ResourceManager>(); playerControl = player.GetComponent<PlayerBoatController>(); } }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); eventHandler = GameObject.FindGameObjectWithTag("EventController").GetComponent<EventManagement>(); playerStats = player.GetComponent<PlayerBoatController>(); }
// Use this for initialization void Start() { if(gameController!=null) { Destroy(gameObject); } player = GameObject.FindGameObjectWithTag("Player"); resourceController = player.GetComponent<ResourceManager>(); playerController = player.GetComponent<PlayerBoatController>(); enemies = GameObject.FindGameObjectsWithTag("OverworldEnemy"); gameController = this; OverworldParent = GameObject.FindGameObjectWithTag("UniversalParent"); unitsReward = new Dictionary<string, int>(); }
// Use this for initialization void Start() { mask = 1 << LayerToNotDrawThrough; player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerBoatController>(); vertices = new Queue<Vector3>(); }
//need these functions so that the player doesn't need to be attached to the overworld UI // Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); resources = player.GetComponent<ResourceManager>(); playerControl = player.GetComponent<PlayerBoatController>(); }