예제 #1
0
        public void SetDisplayCharacter(Character.Character character)
        {
            if (character == null)
            {
                throw new ArgumentNullException(nameof(character));
            }

            _CharacterNameText.Text = character.Name;
            _CharacterNameText.Show();
            _Character.SetVisual(character.Template.Model.BaseDef.Visual);

            //We have custom visuals from the server because it is a human character.
            if (character is HumanCharacter humanCharacter)
            {
                HumanCharacterVisuals visuals = humanCharacter.CharacterVisuals;
                _Character.SetAdditionalVisuals(visuals.BodyMesh.ToString(), (int)visuals.BodyTex, visuals.HeadMesh.ToString(), (int)visuals.HeadTex);
                _Character.SetFatness(visuals.Fatness);
                _Character.SetScale(new Types.Vec3f(visuals.BodyWidth, 1.0f, visuals.BodyWidth));
            }
            else
            {
                //Its a non human character, take the visuals from the template.
                _Character.SetAdditionalVisuals(character.Template.BodyMesh, character.Template.BodyTex, character.Template.HeadMesh, character.Template.HeadTex);
                _Character.SetFatness(1);
                _Character.SetScale(new Types.Vec3f(1.0f, 1.0f, 1.0f));
            }

            _DisplayCharacterIsHidden = false;
        }
예제 #2
0
        private void OnCursorChanged(GUCMainMenu sender)
        {
            if (cursor >= 0 && cursor < _Characters.Length)
            {
                Character.Character character = _Characters[cursor];

                _CharacterNameText.Text = character.Name;
                _CharacterNameText.Show();
                _CharacterDisplay.SetVisual(character.Template.Model.BaseDef.Visual);

                //We have custom visuals from the server because it is a human character.
                if (character is HumanCharacter humanCharacter)
                {
                    HumanCharacterVisuals visuals = humanCharacter.CharacterVisuals;
                    _CharacterDisplay.SetAdditionalVisuals(visuals.BodyMesh.ToString(), (int)visuals.BodyTex, visuals.HeadMesh.ToString(), (int)visuals.HeadTex);
                    _CharacterDisplay.SetFatness(visuals.Fatness);
                    _CharacterDisplay.SetScale(new Types.Vec3f(visuals.BodyWidth, 1.0f, visuals.BodyWidth));
                }
                else
                {
                    //Its a non human character, take the visuals from the template.
                    _CharacterDisplay.SetAdditionalVisuals(character.Template.BodyMesh, character.Template.BodyTex, character.Template.HeadMesh, character.Template.HeadTex);
                    _CharacterDisplay.SetFatness(1);
                    _CharacterDisplay.SetScale(new Types.Vec3f(1.0f, 1.0f, 1.0f));
                }
            }
        }
예제 #3
0
 public override void Select()
 {
     leftArrow.Show();
     rightArrow.Show();
     _ZoomText.Show();
 }