protected override void HandleAvatarCreationForStageCreation(EvtStageCreated evt, out bool sendStageReady) { List <MonoSpawnPoint> avatarSpawnPointList = new List <MonoSpawnPoint>(); foreach (string str in evt.avatarSpawnNameList) { int namedSpawnPointIx = Singleton <StageManager> .Instance.GetStageEnv().GetNamedSpawnPointIx(str); avatarSpawnPointList.Add(Singleton <StageManager> .Instance.GetStageEnv().spawnPoints[namedSpawnPointIx]); } if (evt.isBorn) { this.CreateMPAvatars(); } Singleton <AvatarManager> .Instance.InitAvatarsPos(avatarSpawnPointList); Singleton <MonsterManager> .Instance.InitMonstersPos(evt.offset); if (!Singleton <MPManager> .Instance.isMaster) { MPSendPacketContainer pc = Singleton <MPManager> .Instance.CreateSendPacket <Packet_Level_PeerStageReady>(); Packet_Level_PeerStageReady.StartPacket_Level_PeerStageReady(pc.builder); Packet_Level_PeerStageReady.AddState(pc.builder, PingPongEnum.Request); pc.Finish <Packet_Level_PeerStageReady>(Packet_Level_PeerStageReady.EndPacket_Level_PeerStageReady(pc.builder)); Singleton <MPManager> .Instance.SendReliableToPeer(0x21800001, 1, pc); } sendStageReady = false; }
protected virtual void HandleAvatarCreationForStageCreation(EvtStageCreated evt, out bool sendStageReady) { List <MonoSpawnPoint> avatarSpawnPointList = new List <MonoSpawnPoint>(); foreach (string str in evt.avatarSpawnNameList) { int namedSpawnPointIx = Singleton <StageManager> .Instance.GetStageEnv().GetNamedSpawnPointIx(str); avatarSpawnPointList.Add(Singleton <StageManager> .Instance.GetStageEnv().spawnPoints[namedSpawnPointIx]); } if (evt.isBorn) { Singleton <AvatarManager> .Instance.CreateTeamAvatars(); Singleton <AvatarManager> .Instance.InitAvatarsPos(avatarSpawnPointList); Singleton <MonsterManager> .Instance.InitMonstersPos(evt.offset); } else { Singleton <AvatarManager> .Instance.InitAvatarsPos(avatarSpawnPointList); Singleton <MonsterManager> .Instance.InitMonstersPos(evt.offset); } sendStageReady = true; }
private bool ListenStageCreated(EvtStageCreated evt) { this.WaitShowTutorialStep(0.09f, new Action(this.SetupController)); return(false); }