BossBattleScene.cs 731 B

12345678910111213141516171819202122232425
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.SceneManagement;
  4. public class BossBattleScene : BaseBattleScene
  5. {
  6. public BossBattleScene(BossBattle battle, string sceneName):
  7. base(battle,sceneName)
  8. {
  9. }
  10. public override void OnSceneLoaded()
  11. {
  12. GameObject[] rootObjs = mScene.GetRootGameObjects();
  13. ReadyPoint actorBornPoint = null;
  14. GameObject spawnPoint = rootObjs.FindFirst(a => a.name.CompareTo(Constants.actor_born_point) == 0);
  15. if (spawnPoint != null)
  16. {
  17. actorBornPoint = spawnPoint.GetComponent<ReadyPoint>();
  18. }
  19. BossBattle battle = mBattle as BossBattle;
  20. battle.SetActorReadyPoint(actorBornPoint);
  21. }
  22. }