public void HandleEvent(int key, params object[] args)
        {
            switch (key)
            {
            case (int)SetupEvent.ChangeAppearance:
            {
                AppearanceSlot slot = (AppearanceSlot)args[0];
                int            id   = (int)args[1];
                m_Appearance.SetAppearance(slot, id);
                m_Appearance.CombineMeshs();
                break;
            }

            case (int)SetupEvent.ChangeColor:
            {
                AppearanceColor slot  = (AppearanceColor)args[0];
                Color           color = (Color)args[1];
                m_Appearance.SetColor(slot, color);
                break;
            }
            }
        }
示例#2
0
        public void SetAppearance(AppearanceSlot slot, int id)
        {
            switch (slot)
            {
            case AppearanceSlot.Hair:
                SetHair(id);
                break;

            case AppearanceSlot.Head:
                SetHead(id);
                break;

            case AppearanceSlot.FacialHair:
                SetFacialHair(id);
                break;

            case AppearanceSlot.EyeBrows:
                SetEyebrows(id);
                break;

            case AppearanceSlot.Torso:
                SetTorso(id);
                break;

            case AppearanceSlot.ArmUpperRight:
                SetArmUpperRight(id);
                break;

            case AppearanceSlot.ArmUpperLeft:
                SetArmUpperLeft(id);
                break;

            case AppearanceSlot.ArmLowerRight:
                SetArmLowerRight(id);
                break;

            case AppearanceSlot.ArmLowerLeft:
                SetArmLowerLeft(id);
                break;

            case AppearanceSlot.HandRight:
                SetHandRight(id);
                break;

            case AppearanceSlot.HandLeft:
                SetHandLeft(id);
                break;

            case AppearanceSlot.Hips:
                SetHips(id);
                break;

            case AppearanceSlot.LegRight:
                SetLegRight(id);
                break;

            case AppearanceSlot.LegLeft:
                SetLegLeft(id);
                break;

            case AppearanceSlot.ShoulderRight:
                SetShoulderRight(id);
                break;

            case AppearanceSlot.ShoulderLeft:
                SetShoulderLeft(id);
                break;

            case AppearanceSlot.ElbowRight:
                SetElbowRight(id);
                break;

            case AppearanceSlot.ElbowLeft:
                SetElbowLeft(id);
                break;

            case AppearanceSlot.KneeRight:
                SetKneeRight(id);
                break;

            case AppearanceSlot.KneeLeft:
                SetKneeLeft(id);
                break;

            case AppearanceSlot.Ear:
                SetElfEar(id);
                break;

            case AppearanceSlot.HipsAttach:
                break;

            case AppearanceSlot.HelmetWithoutHead:
                SetHelmetWithoutHead(id);
                break;

            case AppearanceSlot.HelmetWithHead:
                SetHelmetWithHead(id);
                break;

            case AppearanceSlot.BackAttach:
                SetBackAttach(id);
                break;
            }
        }
示例#3
0
 public EquipmentAppearancePair(AppearanceSlot slot, int id)
 {
     this.slot = slot;
     this.id   = id;
 }
示例#4
0
        public SkinnedMeshRenderer GetMeshBySlot(AppearanceSlot slot, Sex sex, int id, params object[] args)
        {
            switch (slot)
            {
            case AppearanceSlot.Hair:
                return(GetHair(id));

            case AppearanceSlot.Head:
                return(GetHead(sex, id));

            case AppearanceSlot.FacialHair:
                return(GetFacialHair(id));

            case AppearanceSlot.EyeBrows:
                return(GetEyebrows(sex, id));

            case AppearanceSlot.Torso:
                return(GetTorso(sex, id));

            case AppearanceSlot.ArmUpperRight:
                return(GetArmUpperRight(sex, id));

            case AppearanceSlot.ArmUpperLeft:
                return(GetArmUpperLeft(sex, id));

            case AppearanceSlot.ArmLowerRight:
                return(GetArmLowerRight(sex, id));

            case AppearanceSlot.ArmLowerLeft:
                return(GetArmLowerLeft(sex, id));

            case AppearanceSlot.HandRight:
                return(GetHandRight(sex, id));

            case AppearanceSlot.HandLeft:
                return(GetHandLeft(sex, id));

            case AppearanceSlot.Hips:
                return(GetHips(sex, id));

            case AppearanceSlot.LegRight:
                return(GetLegRight(sex, id));

            case AppearanceSlot.LegLeft:
                return(GetLegLeft(sex, id));

            case AppearanceSlot.ShoulderRight:
                return(GetShoulderRight(id));

            case AppearanceSlot.ShoulderLeft:
                return(GetShoulderLeft(id));

            case AppearanceSlot.ElbowRight:
                return(GetElbowRight(id));

            case AppearanceSlot.ElbowLeft:
                return(GetElbowLeft(id));

            case AppearanceSlot.KneeRight:
                return(GetKneeRight(id));

            case AppearanceSlot.KneeLeft:
                return(GetKneeLeft(id));

            case AppearanceSlot.Ear:
                return(GetElfEar(id));

            case AppearanceSlot.HipsAttach:
                return(GetHipsAttachment(id));

            case AppearanceSlot.BackAttach:
                return(GetBackAttachment(id));

            case AppearanceSlot.HelmetWithoutHead:
                return(GetHeadNoElement(sex, id));

            case AppearanceSlot.HelmetWithHead:
                HelmetType type = (HelmetType)args[0];
                return(GetHelmetWithHeadMesh(type, id));

            default:
                return(null);
            }
        }