예제 #1
0
        public void Create()
        {
            var list  = new Generics.List <int>();
            var list2 = new Collections.Generic.List <int>();
            var error = new Sys.ArgumentOutOfRangeException();

            Sys.ArgumentOutOfRangeException.ReferenceEquals("", "");
        }
예제 #2
0
        public override void HandleJoinZone(StateObject Client, string Input)
        {
            var ParticipantsInWaddle = Client.IServer.Clients.FindAll(o => o.GameZoneID == Client.GameZoneID);

            Generics.List <string> PlayerStringDetails = new Generics.List <string>();
            foreach (var Participant in ParticipantsInWaddle)
            {
                PlayerStringDetails.Add(string.Join("|", new string[] { Participant.Name, Participant.Color, "15007", Participant.Name }));
            }
            Client.SendXt(new string[] { "uz", "-1", "4", string.Join("%", PlayerStringDetails) });
        }
    protected static IEnumerable GetHelloWorldScene()
    {
        var sceneCount = SceneManager.sceneCountInBuildSettings;
        var scenes     = new Generics.List <string>();

        for (int sceneIndex = 0; sceneIndex < sceneCount; ++sceneIndex)
        {
            var scenePath = SceneUtility.GetScenePathByBuildIndex(sceneIndex);
            if (scenePath.Contains("Hello World"))
            {
                scenes.Add(scenePath);
            }
        }
        return(scenes);
    }
예제 #4
0
        public override void HandleGetWaddle(StateObject Client, string Input)
        {
            try {
                string CurrentParticipants           = string.Empty;
                Generics.List <int> ParticipantsList = new Generics.List <int>(Participants.Keys);
                foreach (int WaddleID in ParticipantsList)
                {
                    switch (WaddleID)
                    {
                    case 103:
                        if (Participants[WaddleID].Count == 0)
                        {
                            CurrentParticipants += WaddleID + "|" + "," + "%";
                        }
                        else
                        {
                            var IParticipants = Participants[WaddleID].GetRange(0, Participants[WaddleID].Count);
                            Generics.List <string> ParticipantsNameList = new Generics.List <string> {
                            };
                            foreach (var Participant in IParticipants)
                            {
                                ParticipantsNameList.Add(Participant.Name);
                            }
                            if (ParticipantsNameList.Count == 1)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + ",%";
                            }
                            else
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + "%";
                            }
                        }
                        break;

                    case 102:
                        if (Participants[WaddleID].Count == 0)
                        {
                            CurrentParticipants += WaddleID + "|" + "," + "%";
                        }
                        else
                        {
                            var IParticipants = Participants[WaddleID].GetRange(0, Participants[WaddleID].Count);
                            Generics.List <string> ParticipantsNameList = new Generics.List <string> {
                            };
                            foreach (var Participant in IParticipants)
                            {
                                ParticipantsNameList.Add(Participant.Name);
                            }
                            if (ParticipantsNameList.Count == 1)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + ",%";
                            }
                            else
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + "%";
                            }
                        }
                        break;

                    case 101:
                        if (Participants[WaddleID].Count == 0)
                        {
                            CurrentParticipants += WaddleID + "|" + ",," + "%";
                        }
                        else
                        {
                            var IParticipants = Participants[WaddleID].GetRange(0, Participants[WaddleID].Count);
                            Generics.List <string> ParticipantsNameList = new Generics.List <string> {
                            };
                            foreach (var Participant in IParticipants)
                            {
                                ParticipantsNameList.Add(Participant.Name);
                            }
                            if (ParticipantsNameList.Count == 1)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + ",,%";
                            }
                            else if (ParticipantsNameList.Count == 2)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + ",%";
                            }
                            else if (ParticipantsNameList.Count == 3)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + "%";
                            }
                        }
                        break;

                    case 100:
                        if (Participants[WaddleID].Count == 0)
                        {
                            CurrentParticipants += WaddleID + "|" + ",,," + "%";
                        }
                        else
                        {
                            var IParticipants = Participants[WaddleID].GetRange(0, Participants[WaddleID].Count);
                            Generics.List <string> ParticipantsNameList = new Generics.List <string> {
                            };
                            foreach (var Participant in IParticipants)
                            {
                                ParticipantsNameList.Add(Participant.Name);
                            }
                            if (ParticipantsNameList.Count == 1)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + ",,,%";
                            }
                            else if (ParticipantsNameList.Count == 2)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + ",,%";
                            }
                            else if (ParticipantsNameList.Count == 3)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + ",%";
                            }
                            else if (ParticipantsNameList.Count == 4)
                            {
                                CurrentParticipants += WaddleID + "|" + string.Join(",", ParticipantsNameList) + "%";
                            }
                        }
                        break;
                    }
                }

                Client.SendXt(new string[]
                {
                    "gw", Client.ZoneId, CurrentParticipants
                });
            }

            catch (System.Exception) {
            }
        }
예제 #5
0
        // --- Static Methods ---
        // Clones the model
        public static Model cloneModel(Model model, GameExt game)
        {
            if(model== null)
                return null;

            // Variables
            Generics.List<ModelBone>	bones=	new Generics.List<ModelBone>();
            Generics.List<ModelMesh>	meshes=	new Generics.List<ModelMesh>();
            Generics.List<ModelMeshPart>	parts=	new Generics.List<ModelMeshPart>();

            for(int i= 0; i< model.Bones.Count; i++)
                bones.Add(model.Bones[i]);
            for(int h= 0; h< model.Meshes.Count; h++)
            {
                meshes.Add(model.Meshes[h]);
                for(int k= 0; k< model.Meshes[h].MeshParts.Count; k++)
                {
                    parts.Add(model.Meshes[h].MeshParts[k]);
                    parts[k].Effect=	model.Meshes[h].MeshParts[k].Effect;
                    parts[k].IndexBuffer=	model.Meshes[h].MeshParts[k].IndexBuffer;
                    parts[k].NumVertices=	model.Meshes[h].MeshParts[k].NumVertices;
                    parts[k].PrimitiveCount=	model.Meshes[h].MeshParts[k].PrimitiveCount;
                    parts[k].StartIndex=	model.Meshes[h].MeshParts[k].StartIndex;
                    parts[k].VertexBuffer=	model.Meshes[h].MeshParts[k].VertexBuffer;
                    parts[k].VertexOffset=	model.Meshes[h].MeshParts[k].VertexOffset;
                }
                meshes[h].MeshParts=	new ModelMeshPartCollection(parts);
            }

            return new Model(game.GraphicsDevice, bones, meshes);
        }