// 레벨 시작 시에 호출. public override void start() { this.player = PartyControl.get().getLocalPlayer(); this.kabusan = CharacterRoot.get().findCharacter <chrBehaviorKabu>("NPC_Kabu_San"); // 스포트 라이트. this.spotlight_player = this.spotlight_prefab.instantiate(); this.spotlight_kabusan = this.spotlight_kabusan_prefab.instantiate(); this.spotlight_items = new GameObject[2]; for (int i = 0; i < 2; i++) { this.spotlight_items[i] = this.spotlight_prefab.instantiate(); } this.spotlight_items[0].setPosition(WeaponSelectMapInitializer.getNegiItemPosition().Y(4.0f)); this.spotlight_items[1].setPosition(WeaponSelectMapInitializer.getYuzuItemPosition().Y(4.0f)); this.spotlight_key = this.spotlight_key_prefab.instantiate(); this.spotlight_key.SetActive(false); // 플래그 - 각 플레이어의 선택이 끝났는가?. this.select_done_players = new bool[NetConfig.PLAYER_MAX]; for (int i = 0; i < this.select_done_players.Length; i++) { if (GameRoot.get().isConnected(i)) { this.select_done_players[i] = false; } else { // 참가하지 않은 플레이어는 '선택완료'로 해 둔다. this.select_done_players[i] = true; } } // 다른 플레이어의 상황을 나타내는 아이콘 생성하다. this.create_selecting_icons(); // Network 클래스의 컴포넌트를 획득. GameObject obj = GameObject.Find("Network"); if (obj != null) { this.m_network = obj.GetComponent <Network>(); if (this.m_network != null) { m_network.RegisterReceiveNotification(PacketId.GameSyncInfo, OnReceiveSyncPacket); } } this.step.set_next(STEP.DEMO0); }
// 맵에 아이텝을 배치하는 메소드. private void generateItems(GameRoot gameRoot) { string local_player_id = PartyControl.get().getLocalPlayer().getAcountID(); string item_type = "shot_negi"; string item_name = item_type + "." + local_player_id; ItemManager.get().createItem(item_type, item_name, local_player_id); ItemManager.get().setPositionToItem(item_name, WeaponSelectMapInitializer.getNegiItemPosition()); item_type = "shot_yuzu"; item_name = item_type + "." + local_player_id; ItemManager.get().createItem(item_type, item_name, local_player_id); ItemManager.get().setPositionToItem(item_name, WeaponSelectMapInitializer.getYuzuItemPosition()); }