コード例 #1
0
    public void LoadLevel(int level)
    {
        StopAllCoroutines();
        DestroyMap();
        currentMap = Instantiate(Resources.Load <GameObject>("Map")).GetComponent <Map>();
        if (isLoaded)
        {
            Random.InitState(buildSeed);
            isLoaded = false;//초기화
        }
        else
        {
            buildSeed = Random.Range(int.MinValue, int.MaxValue);
            Random.InitState(buildSeed);
        }
        Debug.Log("Seed : " + buildSeed);
        if (Config.instance.RoomTestMode)
        {
            BuildMap(Config.instance.floorNum);
        }
        else
        {
            BuildMap(level);
        }
        MinimapTexture.Init(currentMap);

        player.EnterRoom(CurrentMap.StartRoom);
        MinimapTexture.DrawPlayerPos(CurrentRoom().transform.position, player.pos);
        UIManager.instance.FloorCount(level);
        PlayerControl.instance.AkashaGage = Config.instance.DefaultAkasha;

        ///업적: 층
        SaveManager.ArriveStage(level);
    }
コード例 #2
0
 /// <summary>
 /// 반드시 EnemyControler 클래스에서만 호출하도록 할것
 /// </summary>
 public void OnEndEnemyTurn()
 {
     currentTurn = Turn.PLAYER;
     PlayerControl.playerBuff.OnPlayerTurn();
     PlayerControl.instance.OnPlayerTurn();
     MinimapTexture.DrawEnemies(CurrentRoom().transform.position, CurrentRoom().GetEnemyPoses());
 }
コード例 #3
0
    public void OnPlayerEnterRoom(Room newRoom)
    {
        MinimapTexture.SetRoomColor(newRoom);

        if (newRoom.roomType == RoomType.BOSS && newRoom.IsVisited == false)
        {
            PlayBossBGM(CurrentMap.Floor);
            ShowBossPopUP(CurrentMap.Floor);
        }
        else
        {
            PlayBGM(CurrentMap.Floor);
        }

        if (newRoom.IsVisited == false)
        {
            newRoom.IsVisited = true;
            EnemyControl.instance.SetRoom(newRoom);
            MinimapTexture.DrawRoom(newRoom);

            if (newRoom.roomType == RoomType.START)
            {
                newRoom.OpenDoors();
            }
        }

        SetCurrentRoom(newRoom);
    }
コード例 #4
0
ファイル: CacheUIObject.cs プロジェクト: shmilyzxt/db-plugins
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = Distance;
         hashCode = (hashCode * 397) ^ Radius;
         hashCode = (hashCode * 397) ^ RadiusDistance;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (InCache != null ? InCache.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (IgnoreReason != null ? IgnoreReason.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Weight != null ? Weight.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (IsBoss != null ? IsBoss.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (IsElite != null ? IsElite.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (IsQuestMonster != null ? IsQuestMonster.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (IsMinimapActive != null ? IsMinimapActive.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MarkerHash != null ? MarkerHash.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MinimapTexture != null ? MinimapTexture.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (WeightInfo != null ? WeightInfo.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ RActorGUID;
         hashCode = (hashCode * 397) ^ ActorSNO;
         hashCode = (hashCode * 397) ^ ACDGuid;
         return(hashCode);
     }
 }
コード例 #5
0
 public void ReturnToStart()
 {
     if (!GameManager.instance.CurrentRoom().IsEnemyAlive())
     {
         if (GameManager.instance.IsInputOk && GameManager.instance.CurrentTurn == Turn.PLAYER)
         {
             player.EnterRoom(GameManager.instance.CurrentMap.StartRoom);
             MinimapTexture.DrawPlayerPos(GameManager.instance.CurrentRoom().transform.position, PlayerControl.player.pos);
         }
     }
 }
コード例 #6
0
 public override void SomethingUpOnThis(Entity ot)
 {
     if (ot is Player)
     {
         bool isVisited = targetRoom.IsVisited;
         (ot as Player).EnterRoom(this);
         if (!isVisited)
         {
             MinimapTexture.DrawHallWay(transform.position, connectedDoor.transform.position, Dir);
         }
     }
 }
コード例 #7
0
    IEnumerator EndTurnDelay(float time)
    {
        yield return(null);

        if (PlayerControl.player.PlayerAnim == null)
        {
            yield return(new WaitForSeconds(time));
        }
        else
        {
            yield return(PlayerControl.player.PlayerAnim);
        }
        MinimapTexture.DrawPlayerPos(CurrentRoom().transform.position, PlayerControl.player.pos);
        EnemyControl.instance.EnemyTurn();
    }