Ejemplo n.º 1
0
 private void Start()
 {
     player       = GameObject.FindGameObjectWithTag("Player");
     audioManager = GameObject.FindGameObjectWithTag("AudioManager").GetComponent <AudioManager>();
     //terrainMap = GameObject.FindGameObjectWithTag("TerrainMap").GetComponent<GridSettings>().GetGrid();
     agentInfo     = GetComponent <AiAgentInfo>();
     agentCollider = GetComponent <Collider2D>();
 }
Ejemplo n.º 2
0
 public void Start()
 {
     uiInfo     = GameObject.FindGameObjectWithTag("UiInfo");
     sRend      = GetComponent <SpriteRenderer>();
     whiteMat   = Resources.Load("BrightWhite", typeof(Material)) as Material;
     defaultMat = sRend.material;
     agentInfo  = GetComponent <AiAgentInfo>();
     health     = agentInfo.health;
 }