コード例 #1
0
        public ScreensWindow(MainWindowManager manager, string deathScreen, string endScreen)
        {
            InitializeComponent();

            this.manager     = manager;
            openFileManager  = new OpenFileManager();
            this.deathScreen = deathScreen;
            this.endScreen   = endScreen;

            InitializeValues();
        }
コード例 #2
0
        public InputKeysWindow(MainWindowManager manager)
        {
            InitializeComponent();

            this.manager = manager;

            keys = new List <string>();

            LoadKeys();

            InitializeValues();
            SetValues();
        }
コード例 #3
0
ファイル: SettingsForm.cs プロジェクト: wangminqi/ROFL-Player
        public SettingsForm()
        {
            InitializeComponent();
            // Do sizing on objects
            this.GeneralGameTextBox.AutoSize     = false;
            this.GeneralGameTextBox.Size         = new System.Drawing.Size(200, 23);
            this.GeneralLaunchComboBox.AutoSize  = false;
            this.GeneralLaunchComboBox.Size      = new System.Drawing.Size(200, 23);
            this.GeneralUsernameTextBox.AutoSize = false;
            this.GeneralUsernameTextBox.Size     = new Size(200, 23);

            MainWindowManager.Load(this);
        }
コード例 #4
0
        public ConsumableWindow(MainWindowManager manager, bool edit, Consumable consumable)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;
            this.consumable = consumable;

            if (edit)
            {
                SetValues();
            }
        }
コード例 #5
0
        public StageWindow(MainWindowManager manager, bool edit, Stage stage)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;
            this.stage      = stage;

            if (edit)
            {
                SetValues();
            }
        }
コード例 #6
0
        public WallWindow(MainWindowManager manager, bool edit, BackgroundItem bgItem)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;
            this.bgItem     = bgItem;

            if (edit)
            {
                SetValues();
            }
        }
コード例 #7
0
        public NPCWindow(MainWindowManager manager, bool edit, NPC npc)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;
            this.npc        = npc;

            if (edit)
            {
                SetValues();
            }
        }
コード例 #8
0
        public DoorKeyWindow(MainWindowManager manager, bool edit, Door door, KeyItem key)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;
            this.door       = door;
            this.key        = key;

            if (edit)
            {
                SetValues();
            }
        }
コード例 #9
0
        public AbilityWindow(MainWindowManager manager, bool edit, Ability ability)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;
            this.ability    = ability;

            if (edit)
            {
                SetValues();
            }

            InitializeValues();
        }
コード例 #10
0
        public WeaponWindow(MainWindowManager manager, bool edit, Weapon weapon)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;
            this.weapon     = weapon;

            if (edit)
            {
                SetValues();
            }

            InitializeValues();
        }
コード例 #11
0
        public CharacterWindow(MainWindowManager manager, bool edit)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;

            InitializeLists();

            if (edit)
            {
                SetValues();
            }

            InitializeValues();
        }
コード例 #12
0
        public async void Login(Cloudbase cloudbase)
        {
            AuthDropbox   authDropbox   = new AuthDropbox();
            DropboxClient dropboxClient = await authDropbox.GetDropboxClient();

            if (dropboxClient != null)
            {
                ServiceManager.Instence().DropboxClient = dropboxClient;

                //跳转到文件扫描窗口
                UserControl detailControl = new DropboxDetailControl();
                MainWindowManager.Instence().MainVM.MiddleDataControl = detailControl;
            }
            else
            {
                MessageBox.Show("Auth dropbox api failed!!!");
            }
        }
コード例 #13
0
        public EnemyWindow(MainWindowManager manager, bool edit, Enemy enemy)
        {
            InitializeComponent();

            this.manager    = manager;
            openFileManager = new OpenFileManager();
            this.edit       = edit;
            this.enemy      = enemy;

            InitializeList();

            if (edit)
            {
                SetValues();
            }

            InitializeValues();
        }
コード例 #14
0
        public void Login(Cloudbase cloudbase)
        {
            AuthGoogle   authGoogle   = new AuthGoogle();
            DriveService driveService = authGoogle.GetService();

            if (driveService != null)
            {
                ServiceManager.Instence().DriveService = driveService;

                //跳转到文件扫描窗口
                UserControl detailControl = new GoogleDetailControl();
                MainWindowManager.Instence().MainVM.MiddleDataControl = detailControl;
            }
            else
            {
                MessageBox.Show("Auth google api failed!!!");
            }
        }
コード例 #15
0
        public async void Login()
        {
            authInstagram = new AuthInstagram();
            InstamgramClient instamgramClient = await authInstagram.GetInstagramClient();

            if (instamgramClient != null)
            {
                ServiceManager.Instence().InstamgramClient = instamgramClient;

                //跳转到文件扫描窗口
                UserControl detailControl = new InstamgramDetailControl();
                MainWindowManager.Instence().MainVM.MiddleDataControl = detailControl;
            }
            else
            {
                MessageBox.Show("Auth facebook api failed!!!");
            }
        }
コード例 #16
0
        public async void Login(Cloudbase cloudbase)
        {
            authFacebook = new AuthFacebook();
            FacebookClient facebookClient = await authFacebook.GetFacebookClient();

            if (facebookClient != null)
            {
                ServiceManager.Instence().FacebookClient = facebookClient;

                //跳转到文件扫描窗口
                UserControl detailControl = new FacebookDetailControl();
                MainWindowManager.Instence().MainVM.MiddleDataControl = detailControl;
            }
            else
            {
                MessageBox.Show("Auth facebook api failed!!!");
            }
        }
コード例 #17
0
        async void ILogin.Login(Cloudbase cloudbase)
        {
            AuthBox   authBox   = new AuthBox();
            BoxClient boxClient = await authBox.GetBoxClient();

            if (boxClient != null)
            {
                ServiceManager.Instence().BoxClient = boxClient;
                BoxDetailViewModel boxDetailVM      = new BoxDetailViewModel();
                BoxDetailControl   boxDetailControl = new BoxDetailControl();
                boxDetailControl.DataContext = boxDetailVM;
                MainWindowManager.Instence().MainVM.MiddleDataControl = boxDetailControl;
            }
            else
            {
                MessageBox.Show("Auth box api failed!!!");
            }
        }
コード例 #18
0
        public void Login(Cloudbase cloudbase)
        {
            AuthGmail    authGmail     = new AuthGmail();
            GmailService dropboxClient = authGmail.GetService();

            if (dropboxClient != null)
            {
                ServiceManager.Instence().GmailServive = dropboxClient;

                //跳转到文件扫描窗口
                UserControl detailControl = new GmailDetailControl();
                MainWindowManager.Instence().MainVM.MiddleDataControl = detailControl;
            }
            else
            {
                MessageBox.Show("Auth gmail api failed!!!");
            }
        }
コード例 #19
0
        /// <summary>
        /// Builds a string of the stage's information and content.
        /// </summary>
        /// <param name="manager">Main window manager</param>
        /// <returns>String for the DSL</returns>
        public string ToString(MainWindowManager manager)
        {
            string total = "";

            Background = Background.Replace('\\', '/');

            if (!String.IsNullOrEmpty(Music))
            {
                Music = Music.Replace('\\', '/');
            }

            total += "\t<stage>\r\n";

            total += "\t\t<window>\r\n" +
                     "\t\t\t<window_background>" + Background + "</window_background>\r\n" +
                     "\t\t\t<window_background_music>" + Music + "</window_background_music>\r\n" +
                     "\t\t\t<window_id>" + ID + "</window_id>\r\n" +
                     "\t\t\t<window_north>" + ExitUp + "</window_north>\r\n" +
                     "\t\t\t<window_east>" + ExitRight + "</window_east>\r\n" +
                     "\t\t\t<window_south>" + ExitDown + "</window_south>\r\n" +
                     "\t\t\t<window_west>" + ExitLeft + "</window_west>\r\n" +
                     "\t\t</window>\r\n";

            foreach (Enemy enemy in Enemies)
            {
                enemy.ImageMovingUp    = enemy.ImageMovingUp.Replace('\\', '/');
                enemy.ImageMovingDown  = enemy.ImageMovingDown.Replace('\\', '/');
                enemy.ImageMovingLeft  = enemy.ImageMovingLeft.Replace('\\', '/');
                enemy.ImageMovingRight = enemy.ImageMovingRight.Replace('\\', '/');

                if (!String.IsNullOrEmpty(enemy.ImageArrowUp))
                {
                    enemy.ImageArrowUp    = enemy.ImageArrowUp.Replace('\\', '/');
                    enemy.ImageArrowDown  = enemy.ImageArrowDown.Replace('\\', '/');
                    enemy.ImageArrowLeft  = enemy.ImageArrowLeft.Replace('\\', '/');
                    enemy.ImageArrowRight = enemy.ImageArrowRight.Replace('\\', '/');
                }

                int enemySpeed;

                if (enemy.Speed == "slow")
                {
                    enemySpeed = 1;
                }
                else if (enemy.Speed == "normal")
                {
                    enemySpeed = 2;
                }
                else
                {
                    enemySpeed = 3;
                }

                int bulletspeed = enemySpeed + 1;

                total += "\t\t<enemy>\r\n" +
                         "\t\t\t<enemy_image_up>" + enemy.ImageMovingUp + "</enemy_image_up>\r\n" +
                         "\t\t\t<enemy_image_down>" + enemy.ImageMovingDown + "</enemy_image_down>\r\n" +
                         "\t\t\t<enemy_image_left>" + enemy.ImageMovingLeft + "</enemy_image_left>\r\n" +
                         "\t\t\t<enemy_image_right>" + enemy.ImageMovingRight + "</enemy_image_right>\r\n" +
                         "\t\t\t<enemy_bullet_image_up>" + enemy.ImageArrowUp + "</enemy_bullet_image_up>\r\n" +
                         "\t\t\t<enemy_bullet_image_down>" + enemy.ImageArrowDown + "</enemy_bullet_image_down>\r\n" +
                         "\t\t\t<enemy_bullet_image_left>" + enemy.ImageArrowLeft + "</enemy_bullet_image_left>\r\n" +
                         "\t\t\t<enemy_bullet_image_right>" + enemy.ImageArrowRight + "</enemy_bullet_image_right>\r\n" +
                         "\t\t\t<enemy_initial_state>" + enemy.InitialState + "</enemy_initial_state>\r\n" +
                         "\t\t\t<enemy_framecount>" + enemy.FrameCount + "</enemy_framecount>\r\n" +
                         "\t\t\t<enemy_x_position>" + enemy.PositionX + "</enemy_x_position>\r\n" +
                         "\t\t\t<enemy_y_position>" + enemy.PositionY + "</enemy_y_position>\r\n" +
                         "\t\t\t<enemy_speed>" + enemySpeed + "</enemy_speed>\r\n" +
                         "\t\t\t<enemy_bullet_speed>" + bulletspeed + "</enemy_bullet_speed>\r\n" +
                         "\t\t\t<enemy_strenght>" + enemy.Strenght + "</enemy_strenght>\r\n" +
                         "\t\t\t<enemy_dexterity>" + enemy.Dexterity + "</enemy_dexterity>\r\n" +
                         "\t\t\t<enemy_intelligence>" + enemy.Intelligence + "</enemy_intelligence>\r\n" +
                         "\t\t\t<enemy_hit_points>" + enemy.HitPoints + "</enemy_hit_points>\r\n" +
                         "\t\t\t<enemy_ia>" + enemy.Behavoir + "</enemy_ia>\r\n" +
                         "\t\t\t<enemy_preference>" + enemy.Preference + "</enemy_preference>\r\n" +
                         "\t\t\t<enemy_boss>" + enemy.Boss + "</enemy_boss>\r\n" +
                         "\t\t\t<enemy_detect_zone>" + enemy.DetectZone + "</enemy_detect_zone>\r\n" +
                         "\t\t\t<enemy_patrol_zone>" + enemy.PatrolZone + "</enemy_patrol_zone>\r\n";

                if (manager.GetWeapon(enemy.Loot) != null)
                {
                    Weapon weapon = manager.GetWeapon(enemy.Loot);

                    weapon.ImageWeapon = weapon.ImageWeapon.Replace('\\', '/');

                    int weaponSpeed;

                    if (weapon.Speed == "slow")
                    {
                        weaponSpeed = 1;
                    }
                    else if (weapon.Speed == "normal")
                    {
                        weaponSpeed = 2;
                    }
                    else
                    {
                        weaponSpeed = 3;
                    }

                    if (weapon.Type == "melee")
                    {
                        total += "\t\t\t<melee>\r\n" +
                                 "\t\t\t\t<melee_image>" + weapon.ImageWeapon + "</melee_image>\r\n" +
                                 "\t\t\t\t<melee_damage>" + weapon.Damage + "</melee_damage>\r\n" +
                                 "\t\t\t\t<melee_speed>" + weaponSpeed + "</melee_speed>\r\n" +
                                 "\t\t\t</melee>\r\n";
                    }
                    else
                    {
                        weapon.ImageWeapon     = weapon.ImageWeapon.Replace('\\', '/');
                        weapon.ImageArrowUp    = weapon.ImageArrowUp.Replace('\\', '/');
                        weapon.ImageArrowDown  = weapon.ImageArrowDown.Replace('\\', '/');
                        weapon.ImageArrowLeft  = weapon.ImageArrowLeft.Replace('\\', '/');
                        weapon.ImageArrowRight = weapon.ImageArrowRight.Replace('\\', '/');

                        total += "\t\t\t<distance>\r\n" +
                                 "\t\t\t\t<distance_image>" + weapon.ImageWeapon + "</distance_image>\r\n" +
                                 "\t\t\t\t<distance_damage>" + weapon.Damage + "</distance_damage>\r\n" +
                                 "\t\t\t\t<distance_speed>" + weaponSpeed + "</distance_speed>\r\n" +
                                 "\t\t\t\t<distance_bullet_image_up>" + weapon.ImageArrowUp + "</distance_bullet_image_up>\r\n" +
                                 "\t\t\t\t<distance_bullet_image_down>" + weapon.ImageArrowDown + "</distance_bullet_image_down>\r\n" +
                                 "\t\t\t\t<distance_bullet_image_left>" + weapon.ImageArrowLeft + "</distance_bullet_image_left>\r\n" +
                                 "\t\t\t\t<distance_bullet_image_right>" + weapon.ImageArrowRight + "</distance_bullet_image_right>\r\n" +
                                 "\t\t\t</distance>\r\n";
                    }
                }
                else if (manager.GetKey(enemy.Loot) != null)
                {
                    KeyItem key = manager.GetKey(enemy.Loot);

                    key.Image = key.Image.Replace('\\', '/');

                    total += "\t\t\t<key>\r\n" +
                             "\t\t\t\t<key_image>" + key.Image + "</key_image>\r\n" +
                             "\t\t\t\t<key_id>" + key.ID + "</key_id>\r\n" +
                             "\t\t\t</key>\r\n";
                }
                else if (manager.GetConsumable(enemy.Loot) != null)
                {
                    Consumable consumable = manager.GetConsumable(enemy.Loot);

                    consumable.Image = consumable.Image.Replace('\\', '/');

                    total += "\t\t\t<consumable>\r\n" +
                             "\t\t\t\t<consumable_image>" + consumable.Image + "</consumable_image>\r\n" +
                             "\t\t\t\t<consumable_affect>" + consumable.Type + "</consumable_affect>\r\n" +
                             "\t\t\t\t<consumable_effect>" + consumable.Effect + "</consumable_effect>\r\n" +
                             "\t\t\t</consumable>\r\n";
                }

                total += "\t\t</enemy>\r\n";;
            }

            foreach (Consumable consumable in Consumables)
            {
                consumable.Image = consumable.Image.Replace('\\', '/');

                total += "\t\t<consumable>\r\n" +
                         "\t\t\t<consumable_image>" + consumable.Image + "</consumable_image>\r\n" +
                         "\t\t\t<consumable_affect>" + consumable.Type + "</consumable_affect>\r\n" +
                         "\t\t\t<consumable_effect>" + consumable.Effect + "</consumable_effect>\r\n" +
                         "\t\t\t<consumable_x_position>" + consumable.PositionX + "</consumable_x_position>\r\n" +
                         "\t\t\t<consumable_y_position>" + consumable.PositionY + "</consumable_y_position>\r\n" +
                         "\t\t</consumable>\r\n";
            }

            foreach (BackgroundItem wall in BgItems)
            {
                wall.Image = wall.Image.Replace('\\', '/');

                total += "\t\t<wall>\r\n" +
                         "\t\t\t<wall_image>" + wall.Image + "</wall_image>\r\n" +
                         "\t\t\t<wall_x_position>" + wall.PositionX + "</wall_x_position>\r\n" +
                         "\t\t\t<wall_y_position>" + wall.PositionY + "</wall_y_position>\r\n" +
                         "\t\t\t<wall_solid>" + wall.Solid + "</wall_solid>\r\n" +
                         "\t\t\t<wall_bullet_proof>" + wall.BulletProof + "</wall_bullet_proof>\r\n" +
                         "\t\t</wall>\r\n";
            }

            foreach (NPC npc in NonPlayers)
            {
                npc.Image       = npc.Image.Replace('\\', '/');
                npc.DialogImage = npc.DialogImage.Replace('\\', '/');

                total += "\t\t<npc>\r\n" +
                         "\t\t\t<npc_image>" + npc.Image + "</npc_image>\r\n" +
                         "\t\t\t<npc_dialog>" + npc.DialogImage + "</npc_dialog>\r\n" +
                         "\t\t\t<npc_x_position>" + npc.PositionX + "</npc_x_position>\r\n" +
                         "\t\t\t<npc_y_position>" + npc.PositionY + "</npc_y_position>\r\n" +
                         "\t\t</npc>\r\n";
            }

            foreach (Weapon weapon in Weapons)
            {
                weapon.ImageWeapon = weapon.ImageWeapon.Replace('\\', '/');

                int weaponSpeed;

                if (weapon.Speed == "slow")
                {
                    weaponSpeed = 1;
                }
                else if (weapon.Speed == "normal")
                {
                    weaponSpeed = 2;
                }
                else
                {
                    weaponSpeed = 3;
                }

                if (weapon.Type == "melee")
                {
                    total += "\t\t<melee>\r\n" +
                             "\t\t\t<melee_image>" + weapon.ImageWeapon + "</melee_image>\r\n" +
                             "\t\t\t<melee_damage>" + weapon.Damage + "</melee_damage>\r\n" +
                             "\t\t\t<melee_speed>" + weaponSpeed + "</melee_speed>\r\n" +
                             "\t\t\t<melee_x_position>" + weapon.PositionX + "</melee_x_position>\r\n" +
                             "\t\t\t<melee_y_position>" + weapon.PositionY + "</melee_y_position>\r\n" +
                             "\t\t</melee>\r\n";
                }
                else
                {
                    weapon.ImageWeapon     = weapon.ImageWeapon.Replace('\\', '/');
                    weapon.ImageArrowUp    = weapon.ImageArrowUp.Replace('\\', '/');
                    weapon.ImageArrowDown  = weapon.ImageArrowDown.Replace('\\', '/');
                    weapon.ImageArrowLeft  = weapon.ImageArrowLeft.Replace('\\', '/');
                    weapon.ImageArrowRight = weapon.ImageArrowRight.Replace('\\', '/');

                    total += "\t\t<distance>\r\n" +
                             "\t\t\t<distance_image>" + weapon.ImageWeapon + "</distance_image>\r\n" +
                             "\t\t\t<distance_damage>" + weapon.Damage + "</distance_damage>\r\n" +
                             "\t\t\t<distance_speed>" + weaponSpeed + "</distance_speed>\r\n" +
                             "\t\t\t<distance_bullet_image_up>" + weapon.ImageArrowUp + "</distance_bullet_image_up>\r\n" +
                             "\t\t\t<distance_bullet_image_down>" + weapon.ImageArrowDown + "</distance_bullet_image_down>\r\n" +
                             "\t\t\t<distance_bullet_image_left>" + weapon.ImageArrowLeft + "</distance_bullet_image_left>\r\n" +
                             "\t\t\t<distance_bullet_image_right>" + weapon.ImageArrowRight + "</distance_bullet_image_right>\r\n" +
                             "\t\t\t<distance_x_position>" + weapon.PositionX + "</distance_x_position>\r\n" +
                             "\t\t\t<distance_y_position>" + weapon.PositionY + "</distance_y_position>\r\n" +
                             "\t\t</distance>\r\n";
                }
            }

            foreach (Door door in Doors)
            {
                door.Image = door.Image.Replace('\\', '/');

                total += "\t\t<door>\r\n" +
                         "\t\t\t<door_image>" + door.Image + "</door_image>\r\n" +
                         "\t\t\t<door_x_position>" + door.PositionX + "</door_x_position>\r\n" +
                         "\t\t\t<door_y_position>" + door.PositionY + "</door_y_position>\r\n" +
                         "\t\t\t<door_id>" + door.ID + "</door_id>\r\n" +
                         "\t\t</door>\r\n";
            }

            foreach (KeyItem key in Keys)
            {
                key.Image = key.Image.Replace('\\', '/');

                total += "\t\t<key>\r\n" +
                         "\t\t\t<key_image>" + key.Image + "</key_image>\r\n" +
                         "\t\t\t<key_x_position>" + key.PositionX + "</key_x_position>\r\n" +
                         "\t\t\t<key_y_position>" + key.PositionY + "</key_y_position>\r\n" +
                         "\t\t\t<key_id>" + key.ID + "</key_id>\r\n" +
                         "\t\t</key>\r\n";
            }

            total += "\t</stage>\r\n";

            return(total);
        }
コード例 #20
0
ファイル: SettingsForm.cs プロジェクト: wangminqi/ROFL-Player
 private void MainOkButton_Click(object sender, EventArgs e)
 {
     MainWindowManager.CloseWindow(this);
 }
コード例 #21
0
        private void Back_Home(object sender, RoutedEventArgs e)
        {
            UserControl detailControl = new LoginControl();

            MainWindowManager.Instence().MainVM.MiddleDataControl = detailControl;
        }
コード例 #22
0
 public MainWindow()
 {
     InitializeComponent();
     MainWindowManager.Instence().MainVM = mainVM;
     this.DataContext = mainVM;
 }
コード例 #23
0
        /// <summary>
        /// Builds the string of the character's information.
        /// </summary>
        /// <param name="manager">Main window manager</param>
        /// <returns>String for the DSL</returns>
        public string ToString(MainWindowManager manager)
        {
            int    realSpeed;
            string total;

            ImageMovingUp    = ImageMovingUp.Replace('\\', '/');
            ImageMovingDown  = ImageMovingDown.Replace('\\', '/');
            ImageMovingLeft  = ImageMovingLeft.Replace('\\', '/');
            ImageMovingRight = ImageMovingRight.Replace('\\', '/');

            if (!String.IsNullOrEmpty(ImageAttackingUp))
            {
                ImageAttackingUp    = ImageAttackingUp.Replace('\\', '/');
                ImageAttackingDown  = ImageAttackingDown.Replace('\\', '/');
                ImageAttackingLeft  = ImageAttackingLeft.Replace('\\', '/');
                ImageAttackingRight = ImageAttackingRight.Replace('\\', '/');
            }

            if (!String.IsNullOrEmpty(AttackSoundEffect))
            {
                AttackSoundEffect = AttackSoundEffect.Replace('\\', '/');
            }

            if (!String.IsNullOrEmpty(ShootSoundEffect))
            {
                ShootSoundEffect = ShootSoundEffect.Replace('\\', '/');
            }

            if (!String.IsNullOrEmpty(CastSoundEffect))
            {
                CastSoundEffect = CastSoundEffect.Replace('\\', '/');
            }

            if (Speed == "slow")
            {
                realSpeed = 2;
            }
            else if (Speed == "normal")
            {
                realSpeed = 3;
            }
            else
            {
                realSpeed = 4;
            }

            total = "\t<character>\r\n" +
                    "\t\t<character_name>" + Name + "</character_name>\r\n" +
                    "\t\t<character_image_up>" + ImageMovingUp + "</character_image_up>\r\n" +
                    "\t\t<character_image_down>" + ImageMovingDown + "</character_image_down>\r\n" +
                    "\t\t<character_image_left>" + ImageMovingLeft + "</character_image_left>\r\n" +
                    "\t\t<character_image_right>" + ImageMovingRight + "</character_image_right>\r\n" +
                    "\t\t<character_image_attack_up>" + ImageAttackingUp + "</character_image_attack_up>\r\n" +
                    "\t\t<character_image_attack_down>" + ImageAttackingDown + "</character_image_attack_down>\r\n" +
                    "\t\t<character_image_attack_left>" + ImageAttackingLeft + "</character_image_attack_left>\r\n" +
                    "\t\t<character_image_attack_right>" + ImageAttackingRight + "</character_image_attack_right>\r\n" +
                    "\t\t<character_framecount_iddle>" + FrameCount + "</character_framecount_iddle>\r\n" +
                    "\t\t<character_framecount_attacking>" + FrameAttackingCount + "</character_framecount_attacking>\r\n" +
                    "\t\t<character_initial_state>" + InitialState + "</character_initial_state>\r\n" +
                    "\t\t<character_x_position>" + PositionX + "</character_x_position>\r\n" +
                    "\t\t<character_y_position>" + PositionY + "</character_y_position>\r\n" +
                    "\t\t<character_speed>" + realSpeed + "</character_speed>\r\n" +
                    "\t\t<character_key_up>" + manager.KeyUp + "</character_key_up>\r\n" +
                    "\t\t<character_key_down>" + manager.KeyDown + "</character_key_down>\r\n" +
                    "\t\t<character_key_left>" + manager.KeyLeft + "</character_key_left>\r\n" +
                    "\t\t<character_key_right>" + manager.KeyRight + "</character_key_right>\r\n" +
                    "\t\t<character_key_attack>" + manager.KeyAttack + "</character_key_attack>\r\n" +
                    "\t\t<character_key_shoot>" + manager.KeyShoot + "</character_key_shoot>\r\n" +
                    "\t\t<character_key_cast>" + manager.KeyUseAbility + "</character_key_cast>\r\n" +
                    "\t\t<character_key_change_melee>" + manager.KeyChangeMelee + "</character_key_change_melee>\r\n" +
                    "\t\t<character_key_change_distance>" + manager.KeyChangeDistance + "</character_key_change_distance>\r\n" +
                    "\t\t<character_key_change_ability>" + manager.KeyChangeAbility + "</character_key_change_ability>\r\n" +
                    "\t\t<character_key_action>" + manager.KeyAction + "</character_key_action>\r\n" +
                    "\t\t<character_music_attack>" + AttackSoundEffect + "</character_music_attack>\r\n" +
                    "\t\t<character_music_shoot>" + ShootSoundEffect + "</character_music_shoot>\r\n" +
                    "\t\t<character_music_cast>" + CastSoundEffect + "</character_music_cast>\r\n" +
                    "\t\t<character_strenght>" + Strenght + "</character_strenght>\r\n" +
                    "\t\t<character_dexterity>" + Dexterity + "</character_dexterity>\r\n" +
                    "\t\t<character_intelligence>" + Intelligence + "</character_intelligence>\r\n" +
                    "\t\t<character_hit_points>" + HitPoints + "</character_hit_points>\r\n" +
                    "\t\t<character_mana_points>" + Mana + "</character_mana_points>\r\n";

            if (Melee != null)
            {
                Melee.ImageWeapon = Melee.ImageWeapon.Replace('\\', '/');

                int weaponSpeed;

                if (Melee.Speed == "slow")
                {
                    weaponSpeed = 1;
                }
                else if (Melee.Speed == "normal")
                {
                    weaponSpeed = 2;
                }
                else
                {
                    weaponSpeed = 3;
                }

                total += "\t\t<melee>\r\n" +
                         "\t\t\t<melee_image>" + Melee.ImageWeapon + "</melee_image>\r\n" +
                         "\t\t\t<melee_damage>" + Melee.Damage + "</melee_damage>\r\n" +
                         "\t\t\t<melee_speed>" + weaponSpeed + "</melee_speed>\r\n" +
                         "\t\t</melee>\r\n";
            }

            if (Distance != null)
            {
                Distance.ImageWeapon     = Distance.ImageWeapon.Replace('\\', '/');
                Distance.ImageArrowUp    = Distance.ImageArrowUp.Replace('\\', '/');
                Distance.ImageArrowDown  = Distance.ImageArrowDown.Replace('\\', '/');
                Distance.ImageArrowLeft  = Distance.ImageArrowLeft.Replace('\\', '/');
                Distance.ImageArrowRight = Distance.ImageArrowRight.Replace('\\', '/');

                int weaponSpeed;

                if (Distance.Speed == "slow")
                {
                    weaponSpeed = 3;
                }
                else if (Distance.Speed == "normal")
                {
                    weaponSpeed = 4;
                }
                else
                {
                    weaponSpeed = 5;
                }

                total += "\t\t<distance>\r\n" +
                         "\t\t\t<distance_image>" + Distance.ImageWeapon + "</distance_image>\r\n" +
                         "\t\t\t<distance_damage>" + Distance.Damage + "</distance_damage>\r\n" +
                         "\t\t\t<distance_speed>" + weaponSpeed + "</distance_speed>\r\n" +
                         "\t\t\t<distance_bullet_image_up>" + Distance.ImageArrowUp + "</distance_bullet_image_up>\r\n" +
                         "\t\t\t<distance_bullet_image_down>" + Distance.ImageArrowDown + "</distance_bullet_image_down>\r\n" +
                         "\t\t\t<distance_bullet_image_left>" + Distance.ImageArrowLeft + "</distance_bullet_image_left>\r\n" +
                         "\t\t\t<distance_bullet_image_right>" + Distance.ImageArrowRight + "</distance_bullet_image_right>\r\n" +
                         "\t\t</distance>\r\n";
            }

            foreach (Ability ability in manager.Abilities)
            {
                ability.ImageAbility = ability.ImageAbility.Replace('\\', '/');

                if (ability.Type == "heal")
                {
                    total += "\t\t<heal_ability>\r\n" +
                             "\t\t\t<heal_ability_image>" + ability.ImageAbility + "</heal_ability_image>\r\n" +
                             "\t\t\t<heal_ability_mana>" + ability.Mana + "</heal_ability_mana>\r\n" +
                             "\t\t\t<heal_ability_effect>" + ability.Effect + "</heal_ability_effect>\r\n" +
                             "\t\t</heal_ability>\r\n";
                }
                else if (ability.Type == "attack")
                {
                    int abilitySpeed;

                    if (ability.Speed == "slow")
                    {
                        abilitySpeed = 3;
                    }
                    else if (ability.Speed == "normal")
                    {
                        abilitySpeed = 4;
                    }
                    else
                    {
                        abilitySpeed = 5;
                    }

                    ability.ImageAttackUp    = ability.ImageAttackUp.Replace('\\', '/');
                    ability.ImageAttackDown  = ability.ImageAttackDown.Replace('\\', '/');
                    ability.ImageAttackLeft  = ability.ImageAttackLeft.Replace('\\', '/');
                    ability.ImageAttackRight = ability.ImageAttackRight.Replace('\\', '/');

                    total += "\t\t<attack_ability>\r\n" +
                             "\t\t\t<attack_ability_image>" + ability.ImageAbility + "</attack_ability_image>\r\n" +
                             "\t\t\t<attack_ability_mana>" + ability.Mana + "</attack_ability_mana>\r\n" +
                             "\t\t\t<attack_ability_damage>" + ability.Effect + "</attack_ability_damage>\r\n" +
                             "\t\t\t<attack_ability_speed>" + abilitySpeed + "</attack_ability_speed>\r\n" +
                             "\t\t\t<attack_ability_bullet_image_up>" + ability.ImageAttackUp + "</attack_ability_bullet_image_up>\r\n" +
                             "\t\t\t<attack_ability_bullet_image_down>" + ability.ImageAttackDown + "</attack_ability_bullet_image_down>\r\n" +
                             "\t\t\t<attack_ability_bullet_image_left>" + ability.ImageAttackLeft + "</attack_ability_bullet_image_left>\r\n" +
                             "\t\t\t<attack_ability_bullet_image_right>" + ability.ImageAttackRight + "</attack_ability_bullet_image_right>\r\n" +
                             "\t\t</attack_ability>\r\n";
                }
                else
                {
                    int totalDuration = ability.Duration * 56;

                    total += "\t\t<augmentation_ability>\r\n" +
                             "\t\t\t<augmentation_ability_image>" + ability.ImageAbility + "</augmentation_ability_image>\r\n" +
                             "\t\t\t<augmentation_ability_affect>" + ability.Affect + "</augmentation_ability_affect>\r\n" +
                             "\t\t\t<augmentation_ability_effect>" + ability.Effect + "</augmentation_ability_effect>\r\n" +
                             "\t\t\t<augmentation_ability_mana>" + ability.Mana + "</augmentation_ability_mana>\r\n" +
                             "\t\t\t<augmentation_ability_duration>" + totalDuration + "</augmentation_ability_duration>\r\n" +
                             "\t\t</augmentation_ability>\r\n";
                }
            }

            total += "\t</character>\r\n";

            return(total);
        }
コード例 #24
0
        public void Login(Cloudbase cloudbase)
        {
            UserControl detailControl = new OnedriveControl(cloudbase);

            MainWindowManager.Instence().MainVM.MiddleDataControl = detailControl;
        }