Ejemplo n.º 1
0
        public static void OnKillLoad(String fileName, String filePath, Waifu currentWaifu)
        {
            var priority = fileName.ToLower().Replace("onkill", "");

            if (priority.Contains("single"))
            {
                var currentSprite = GetSpriteFromFile(filePath);
                if (currentSprite != null)
                {
                    currentWaifu.OnKillPics.Add(new OnKillSprite
                    {
                        PicPriority = ResourcePriority.SingleKill,
                        Sprite = GetSpriteFromFile(filePath)
                    });
                }
            }

            if (priority.Contains("double"))
            {
                var currentSprite = GetSpriteFromFile(filePath);
                if (currentSprite != null)
                {
                    currentWaifu.OnKillPics.Add(new OnKillSprite
                    {
                        PicPriority = ResourcePriority.DoubleKill,
                        Sprite = GetSpriteFromFile(filePath)
                    });
                }
            }

            if (priority.Contains("triple"))
            {
                var currentSprite = GetSpriteFromFile(filePath);
                if (currentSprite != null)
                {
                    currentWaifu.OnKillPics.Add(new OnKillSprite
                    {
                        PicPriority = ResourcePriority.TripleKill,
                        Sprite = GetSpriteFromFile(filePath)
                    });
                }
            }

            if (priority.Contains("quadra"))
            {
                var currentSprite = GetSpriteFromFile(filePath);
                if (currentSprite != null)
                {
                    currentWaifu.OnKillPics.Add(new OnKillSprite
                    {
                        PicPriority = ResourcePriority.QuadraKill,
                        Sprite = GetSpriteFromFile(filePath)
                    });
                }
            }

            if (priority.Contains("penta"))
            {
                var currentSprite = GetSpriteFromFile(filePath);
                if (currentSprite != null)
                {
                    currentWaifu.OnKillPics.Add(new OnKillSprite
                    {
                        PicPriority = ResourcePriority.PentaKill,
                        Sprite = GetSpriteFromFile(filePath)
                    });
                }
            }
        }
Ejemplo n.º 2
0
 public static void OnDeathLoad(String fileName, Waifu currentWaifu)
 {
 }
Ejemplo n.º 3
0
 private static void LoadWaifus()
 {
     foreach (var directory in Directory.GetDirectories(WaifusDir))
     {
         var currentWaifu = new Waifu
         {
             Name = directory
         };
         string[] content = Directory.GetFiles(directory);
         foreach (var file in content)
         {
             LoadContentToWaifu(file, currentWaifu);
         }
         Waifus.Add(currentWaifu);
     }
 }
Ejemplo n.º 4
0
        private static void LoadContentToWaifu(String FilePath, Waifu currentWaifu)
        {
            var array = FilePath.Split(Path.DirectorySeparatorChar);
            var fileName = array.Last().ToLower();

            if (fileName.Contains("onkill"))
            {
                OnKillLoad(fileName, FilePath, currentWaifu);
            }

            if (fileName.Contains("ondeath"))
            {
                OnDeathLoad(fileName, currentWaifu);
            }
        }
Ejemplo n.º 5
0
        private static void OnKillLoad(String fileName, String filePath, String DirName, Waifu currentWaifu)
        {
            var MinWaifuLevel = Int32.Parse(DirName);

            var priority = fileName.Replace("onkill", "");

            switch (fileName.GetLast(4))
            {
                case ".png":
                case ".jpg":
                case "jpeg":
                        var currentSprite = GetSpriteFromFile(filePath);
                        if (currentSprite != null)
                        {
                            currentWaifu.OnKillPics.Add(
                                new OnKillSprite
                                {
                                    PicPriority = GetResourcePriority(priority),
                                    MinWaifuLevel = MinWaifuLevel,
                                    Sprite = currentSprite
                                });
                        }
                    break;
                case ".wav":
                        var currentSound = GetSoundStreamFromFile(filePath);
                        if (currentSound.Any())
                        {
                            currentWaifu.OnKillSounds.Add(new OnKillSound
                            {
                                SoundPriority = GetResourcePriority(priority),
                                MinWaifuLevel = MinWaifuLevel,
                                SoundStream = currentSound
                            });
                        }
                    break;
            }
        }
Ejemplo n.º 6
0
        private static void LoadWaifus()
        {
            foreach (var directory in Directory.GetDirectories(WaifusDir))
            {
                var array = directory.Split(Path.DirectorySeparatorChar);
                var waifuName = array.Last();
                var currentWaifu = new Waifu
                {
                    Name = waifuName
                };

                foreach (var d2 in Directory.GetDirectories(directory))
                {
                    var a2 = d2.Split(Path.DirectorySeparatorChar);
                    var d2Name = a2.Last();

                    if (!IsInt(d2Name))
                    {
                        continue;
                    }

                    string[] content = Directory.GetFiles(d2);

                    foreach (var file in content)
                    {
                        LoadContentToWaifu(file, d2Name, currentWaifu);
                    }
                }
                //Game.PrintChat(string.Format("<b><font color='#FF0000'>Waifu#:</font></b> Loaded <b><font color='#7A6EFF'>{0}</font></b>", currentWaifu.Name));

                Waifus.Add(currentWaifu);
            }
            Game.PrintChat(string.Format("<b><font color='#FF0000'>Waifu#:</font></b> Loaded <b><font color='#FF0000'>{0}</font></b> waifus", Waifus.Count));
        }