예제 #1
0
        public void Load()
        {
            Halo4.CampaignSave saveData    = _saveManager.SaveData;
            Halo4.BipedObject  playerBiped = saveData.PlayerBiped;
            checkInvincible.IsChecked = playerBiped.Invincible;

            txtPlayerXCord.Text = playerBiped.Position.X.ToString();
            txtPlayerYCord.Text = playerBiped.Position.Y.ToString();
            txtPlayerZCord.Text = playerBiped.Position.Z.ToString();
        }
예제 #2
0
        public bool Save()
        {
            Halo4.CampaignSave saveData = _saveManager.SaveData;

            Halo4.BipedObject playerBiped = saveData.PlayerBiped;
            playerBiped.MakeInvincible((bool)checkInvincible.IsChecked);

            GameObject playerCarrier = playerBiped.Carrier;

            if (playerCarrier != null && playerCarrier.TagGroup == TagGroup.Vehi)
            {
                playerBiped.Carrier.MakeInvincible((bool)checkInvincible.IsChecked);
            }

            float newX = Convert.ToSingle(txtPlayerXCord.Text);
            float newY = Convert.ToSingle(txtPlayerYCord.Text);
            float newZ = Convert.ToSingle(txtPlayerZCord.Text);

            playerBiped.Position = new MathUtil.Vector3(newX, newY, newZ);

            return(true);
        }