Example #1
0
        public MeshContainer GetMesh(string id)
        {
            MeshContainer retVal = null;
            int           index  = -1;

            if (m_dict.TryGetValue(id, out index))
            {
                retVal = meshContainers[index];
            }

            return(retVal);
        }
Example #2
0
        public void LoadCharacter()
        {
            if (r_manager == null)
            {
                r_manager = Resources.Load("Resources Manager") as ResourcesManager;
            }

            MeshContainer m = r_manager.GetMesh(outfitId);

            if (m == null)
            {
                return;
            }
            LoadMeshContainer(m);
        }
Example #3
0
        public bool isEquiped(Object obj, MyObjectType t)
        {
            bool retVal = false;

            switch (t)
            {
            case MyObjectType.mw:
            case MyObjectType.sw:
                Weapon w        = (Weapon)obj;
                Weapon w_actual = r_manager.GetWeapon((t == MyObjectType.mw)? playerProfile.mw_id.value : playerProfile.sw_id.value);
                if (w == w_actual)
                {
                    retVal = true;
                }

                break;

            case MyObjectType.mask:
                Mask m        = (Mask)obj;
                Mask m_actual = r_manager.GetMask(playerProfile.mask_id.value);
                if (m == m_actual)
                {
                    retVal = true;
                }

                break;

            case MyObjectType.skill:
                break;

            case MyObjectType.outfit:
                MeshContainer mc = (MeshContainer)obj;
                if (string.Equals(mc.id, playerProfile.outfitID.value))
                {
                    retVal = true;
                }

                break;

            default:
                break;
            }

            return(retVal);
        }
Example #4
0
 public void LoadMeshContainer(MeshContainer m)
 {
     bodyRenderer.sharedMesh = (isFemale)? m.f_mesh : m.m_mesh;
     bodyRenderer.material   = m.material;
 }