protected void decideNextStep() { if (m_isHost) { // 가까이에 있는(퀵 공격 할 수 있는) 플레이어를 찾는다. chrBehaviorPlayer target = this.find_close_player(); if (target != null) { this.next_step = STEP.ACTION; EnemyRoot.getInstance().RequestBossQuickAttack(target.getAcountID(), 1.0f); } else { // FIXME: 통신에 대응시킬 것. float randomValue = Random.value * 4; if (randomValue < 1.0f) { Debug.Log("DirectAttack"); this.next_step = STEP.ACTION; EnemyRoot.getInstance().RequestBossDirectAttack(focus.getAcountID(), 1.0f); } else if (randomValue < 2.0f) { Debug.Log("RangeAttack"); this.next_step = STEP.ACTION; EnemyRoot.getInstance().RequestBossRangeAttack(1.0f, 5.0f); } else { this.next_step = STEP.MOVE; } } } else { this.next_step = STEP.MOVE; } // ---------------------------------------------------------------- // // 캐릭터 좌표를 보낸다. sendCharacterCoordinates(); }
protected void create_debug_window() { var window = dbwin.root().createWindow("query"); window.createButton("select.done") .setOnPress(() => { for (int i = 0; i < NetConfig.PLAYER_MAX; i++) { var query = new QuerySelectDone(AccountManager.get().getAccountData(i).account_id); QueryManager.get().registerQuery(query); } }); window.createButton("select.finish") .setOnPress(() => { var query = new QuerySelectFinish("Daizuya"); QueryManager.get().registerQuery(query); }); window.createButton("summon dog") .setOnPress(() => { QuerySummonBeast query_summon = new QuerySummonBeast("Daizuya", "Dog"); QueryManager.get().registerQuery(query_summon); }); window.createButton("summon neko") .setOnPress(() => { QuerySummonBeast query_summon = new QuerySummonBeast("Daizuya", "Neko"); QueryManager.get().registerQuery(query_summon); }); window.createButton("cake count") .setOnPress(() => { for (int i = 0; i < PartyControl.get().getFriendCount(); i++) { chrBehaviorPlayer friend = PartyControl.get().getFriend(i); QueryCakeCount query_cake = new QueryCakeCount(friend.getAcountID(), (i + 1) * 10); QueryManager.get().registerQuery(query_cake); } }); #if false window.createButton("버린다") .setOnPress(() => { chrBehaviorLocal player = CharacterRoot.get().findCharacter <chrBehaviorLocal>(GameRoot.getInstance().account_name_local); player.controll.cmdItemQueryDrop(); }); window.createButton("말풍선") .setOnPress(() => { //chrBehaviorLocal player = CharacterRoot.get().findCharacter<chrBehaviorLocal>(GameRoot.getInstance().account_name_local); chrBehaviorNet player = CharacterRoot.get().findCharacter <chrBehaviorNet>("Daizuya"); player.controll.cmdQueryTalk("멀리 있는 사람과 Talk한다", true); }); #endif }