void Start() { xms = GameObject.FindWithTag("MainCamera").GetComponent <XiaowenMonsterSpawn>(); mPlayer = GameObject.FindWithTag("Player"); fh = GameObject.FindWithTag("MainCamera").GetComponent <FixHealth>(); transitionString = "Congratulations, you managed to finish the previous step!"; }
void Start() { pm = GameObject.FindWithTag("Player").GetComponent <PlayerMovement>(); XiaowenMonsterSpawn xms = GameObject.FindWithTag("MainCamera").GetComponent <XiaowenMonsterSpawn>(); xms.controlled = true; }
private void potentialBoss() { GameObject cam = GameObject.Find("Main Camera"); XiaowenMonsterSpawn mu = cam.GetComponent <XiaowenMonsterSpawn>(); mu.MonsterKilledCount++; if (mu.MonsterKilledCount >= 4) { mu.MonsterKilledCount = 0; mu.spawnBoss(); } }
void Start() { GameObject cam = GameObject.Find("Main Camera"); XiaowenMonsterSpawn mu = cam.GetComponent <XiaowenMonsterSpawn>(); gameStage = Stage.ONE; maxHealth = mu.BossMaxHealth; currHealth = mu.BossMaxHealth; player = GameObject.FindWithTag("Player"); player_rb = player.GetComponent <Rigidbody2D>(); }