Exemplo n.º 1
0
 void Start()
 {
     playerStateManager   = GameObject.Find("GameManager").GetComponent <PlayerStateManager>();
     agentMovementManager = GameObject.Find("GameManager").GetComponent <AgentMovementManager>();
     scoreManager         = GameObject.Find("GameManager").GetComponent <ScoreManager>();
     spawnPoint           = GameObject.Find("SpawnPoint");
     playerSpawnPoint     = transform.position;
     allGhost             = GameObject.FindGameObjectsWithTag("Ghost");
 }
 private void Awake()
 {
     rb = GetComponent <Rigidbody2D>();
     agentMovementManager = GameObject.Find("GameManager").GetComponent <AgentMovementManager>();
     spawnPoint           = GameObject.Find("SpawnPoint");
     playerStateManager   = GameObject.Find("GameManager").GetComponent <PlayerStateManager>();
     spriteRenderer       = GetComponent <SpriteRenderer>();
     path = new List <AStarNode>();
     path.Add(new AStarNode(true, transform.position, 0, 0));
     ghostSpawnPoint = transform.position;
     allGhost        = GameObject.FindGameObjectsWithTag("Ghost");
 }
Exemplo n.º 3
0
    private void Awake()
    {
        playerController     = GameObject.Find("Player").GetComponent <PlayerController>();
        agentMovementManager = GameObject.Find("GameManager").GetComponent <AgentMovementManager>();
        lifeManager          = GameObject.Find("GameManager").GetComponent <LifeManager>();
        playerObject         = GameObject.Find("Player");
        allGhosts            = GameObject.FindGameObjectsWithTag("Ghost");
        eventSystem          = GameObject.Find("EventSystem").GetComponent <EventSystem>();

        if (numberOfLifes == 0)
        {
            numberOfLifes       = numberOfLifesHelper;
            numberOfLifesBefore = numberOfLifes;
        }
    }
 void Start()
 {
     rb                   = GetComponent <Rigidbody2D>();
     spriteRenderer       = GetComponent <SpriteRenderer>();
     agentMovementManager = GameObject.Find("GameManager").GetComponent <AgentMovementManager>();
 }