• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GemType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中GemType的典型用法代码示例。如果您正苦于以下问题:C# GemType类的具体用法?C# GemType怎么用?C# GemType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GemType类属于命名空间,在下文中一共展示了GemType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Gem

 public Gem(GemType t, int l, Vector2 p)
 {
     layer = l;
     position = p;
     type = t;
     collected = false;
 }
开发者ID:sjohnst1,项目名称:GeneticAIProject,代码行数:7,代码来源:Gem.cs


示例2: GetGemInfo

 public GemInfo GetGemInfo(GemType type)
 {
     foreach(var info in gemInfo) {
         if(info.type == type) {
             return info;
         }
     }
     return null;
 }
开发者ID:Jarisha,项目名称:Social-Slots,代码行数:9,代码来源:IconGenerator.cs


示例3: FindGemsOfType

 static int FindGemsOfType(GemType type, int[] adjustedSpin, List<GemLocation> gems)
 {
     var counter = 0;
     foreach(var gl in gems) {
         if(gl.type == type && gl.idx == adjustedSpin[gl.reel]) {
             counter++;
         }
     }
     return counter;
 }
开发者ID:Jarisha,项目名称:Social-Slots,代码行数:10,代码来源:DemoSpinner.cs


示例4: BaseJewel

        public BaseJewel( int itemID, Layer layer )
            : base(itemID)
        {
            m_AosAttributes = new AosAttributes( this );
            m_AosResistances = new AosElementAttributes( this );
            m_AosSkillBonuses = new AosSkillBonuses( this );
            m_Resource = CraftResource.Iron;
            m_GemType = GemType.None;

            Layer = layer;
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:11,代码来源:BaseJewel.cs


示例5: CreateGem

    public GameObject CreateGem(GemType type)
    {
        var info = GetGemInfo(type);
        var toReturn = new GameObject(info.name);
        var mf = toReturn.AddComponent<MeshFilter>();
        mf.mesh = baseMesh;
        var mr = toReturn.AddComponent<MeshRenderer>();
        mr.material = info.material;
        toReturn.transform.localScale = info.scale;

        return toReturn;
    }
开发者ID:Jarisha,项目名称:Social-Slots,代码行数:12,代码来源:IconGenerator.cs


示例6: BaseJewel

        public BaseJewel( int itemID, Layer layer )
            : base(itemID)
        {
            m_AosAttributes = new AosAttributes( this );
            m_AosResistances = new AosElementAttributes( this );
            m_AosSkillBonuses = new AosSkillBonuses( this );
            m_Resource = CraftResource.Iron;
            m_GemType = GemType.None;

            Layer = layer;

            m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );
        }
开发者ID:Leodinas,项目名称:uolite,代码行数:13,代码来源:BaseJewel.cs


示例7: BaseJewel

        public BaseJewel(int itemID, Layer layer, JewelEffect effect, int minCharges, int maxCharges)
            : base(itemID)
        {
            m_AosAttributes = new AosAttributes( this );
            m_AosResistances = new AosElementAttributes( this );
            m_AosSkillBonuses = new AosSkillBonuses( this );
            m_Resource = CraftResource.Iron;
            m_GemType = GemType.None;
            m_IDList = new List<Mobile>();

            Layer = layer;
            Weight = 1.0;
            Effect = effect;
            Charges = Utility.RandomMinMax( minCharges, maxCharges );
            m_Identified = false;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:16,代码来源:BaseJewel.cs


示例8: GetGemType

		public static string GetGemType( GemType type )
		{
			switch (type)
			{
				case GemType.StarSapphire: return "star sapphire";
				case GemType.Emerald: return "emerald";
				case GemType.Sapphire: return "sapphire";
				case GemType.Ruby: return "ruby";
				case GemType.Citrine: return "citrine";
				case GemType.Amethyst: return "amethyst";
				case GemType.Tourmaline: return "tourmaline";
				case GemType.Amber: return "amber";
				case GemType.Diamond: return "diamond";
				default: return "";
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:16,代码来源:BaseJewel.cs


示例9: AddJewelrySet

        public void AddJewelrySet( GemType gemType, Type itemType )
        {
            int offset = (int)gemType - 1;

            int index = AddCraft( typeof( GoldRing ), 1044049, 1044176 + offset, 41.8, 90.0, typeof( IronIngot ), 1044036, 1, 1044037 );
            AddRes( index, itemType, 1044231 + offset, 1, 1044240 );

            index = AddCraft( typeof( SilverBeadNecklace ), 1044049, 1044185 + offset, 42.0, 90.0, typeof( IronIngot ), 1044036, 1, 1044037 );
            AddRes( index, itemType, 1044231 + offset, 1, 1044240 );

            index = AddCraft( typeof( GoldNecklace ), 1044049, 1044194 + offset, 41.9, 90.0, typeof( IronIngot ), 1044036, 1, 1044037 );
            AddRes( index, itemType, 1044231 + offset, 1, 1044240 );

            index = AddCraft( typeof( GoldEarrings ), 1044049, 1044203 + offset, 48.4, 90.0, typeof( IronIngot ), 1044036, 1, 1044037 );
            AddRes( index, itemType, 1044231 + offset, 1, 1044240 );

            index = AddCraft( typeof( GoldBeadNecklace ), 1044049, 1044212 + offset, 41.8, 90.0, typeof( IronIngot ), 1044036, 1, 1044037 );
            AddRes( index, itemType, 1044231 + offset, 1, 1044240 );

            index = AddCraft( typeof( GoldBracelet ), 1044049, 1044221 + offset, 44.5, 90.0, typeof( IronIngot ), 1044036, 2, 1044037 );
            AddRes( index, itemType, 1044231 + offset, 1, 1044240 );
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:22,代码来源:DefTinkering.cs


示例10: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 6: m_OldJewel = reader.ReadBool(); goto case 5;
                case 5: m_Seal = reader.ReadString(); goto case 4;
                case 4:
                case 3:
                {
                    m_Crafter = reader.ReadMobile();
                    m_CraftersOriginalName = reader.ReadString();
                    m_Quality = (WeaponQuality)reader.ReadInt();
                    goto case 2;
                }
                case 2:
                {
                    m_Resource = (CraftResource)reader.ReadEncodedInt();
                    m_GemType = (GemType)reader.ReadEncodedInt();

                    goto case 1;
                }
                case 1:
                {
                    m_AosAttributes = new AosAttributes( this, reader );
                    m_AosResistances = new AosElementAttributes( this, reader );
                    m_AosSkillBonuses = new AosSkillBonuses( this, reader );

                    if ( Core.AOS && Parent is Mobile )
                        m_AosSkillBonuses.AddTo( (Mobile)Parent );

                    int strBonus = m_AosAttributes.BonusStr;
                    int dexBonus = m_AosAttributes.BonusDex;
                    int intBonus = m_AosAttributes.BonusInt;

                    if ( Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0) )
                    {
                        Mobile m = (Mobile)Parent;

                        string modName = Serial.ToString();

                        if ( strBonus != 0 )
                            m.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );

                        if ( dexBonus != 0 )
                            m.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero ) );

                        if ( intBonus != 0 )
                            m.AddStatMod( new StatMod( StatType.Int, modName + "Int", intBonus, TimeSpan.Zero ) );
                    }

                    if ( Parent is Mobile )
                        ((Mobile)Parent).CheckStatTimers();

                    break;
                }
                case 0:
                {
                    m_AosAttributes = new AosAttributes( this );
                    m_AosResistances = new AosElementAttributes( this );
                    m_AosSkillBonuses = new AosSkillBonuses( this );

                    break;
                }
            }

            if ( version < 2 )
            {
                m_Resource = CraftResource.Iron;
                m_GemType = GemType.None;
            }

            if( version < 4 )
                Hue = 0;

            if (!String.IsNullOrEmpty(m_Seal) && !Seals.Contains(m_Seal))
                Seals.Add(m_Seal);
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:81,代码来源:BaseJewel.cs


示例11: GetShareStatusAndCommentsCount

        public static async Task<ShareStatusAndCommentsCount> GetShareStatusAndCommentsCount(string gemId, GemType gemtype, string userId)
        {
            try
            {
                if (!CrossConnectivity.Current.IsConnected)
                {
                    return null;
                }

                var client = new System.Net.Http.HttpClient();
                client.DefaultRequestHeaders.Add("Post", "application/json");
                client.BaseAddress = new Uri(Constants.SERVICE_BASE_URL);
                string gemIdString = string.Empty;

                switch (gemtype)
                {
                    case GemType.Goal:
                        gemIdString = "&goal_id=";
                        break;
                    case GemType.Event:
                        gemIdString = "&event_id=";
                        break;
                    case GemType.Action:
                        gemIdString = "&goalaction_id=";
                        break;
                    case GemType.Emotion:
                        gemIdString = "&emotion_id=";
                        break;
                    default:
                        break;
                }

                string uriString = "api.php?action=sharestatus&user_id=" +userId+ gemIdString + gemId;

                var response = await client.GetAsync(uriString);

                if (response != null && response.StatusCode == HttpStatusCode.OK)
                {
                    var responseJson = response.Content.ReadAsStringAsync().Result;
                    var rootobject = JsonConvert.DeserializeObject<ShareStatusResult>(responseJson);
                    if (rootobject != null && rootobject.resultarray != null)
                    {
                        return rootobject.resultarray;
                    }
                }

            }
            catch (Exception ex)
            {
                var test = ex.Message;
            }

            return null;
        }
开发者ID:praveenmohanmm,项目名称:PurposeColor_Bkp_Code,代码行数:54,代码来源:ServiceHelper.cs


示例12: DeleteMediaFromGem

        public static async Task<string> DeleteMediaFromGem(string gemId, GemType gemtype, string mediaName)
        {
            try
            {
                if (!CrossConnectivity.Current.IsConnected)
                {
                    return "404";
                }

                var client = new System.Net.Http.HttpClient();
                client.DefaultRequestHeaders.Add("Post", "application/json");
                client.BaseAddress = new Uri(Constants.SERVICE_BASE_URL);
                string gemIdString = string.Empty;

                switch (gemtype)
                {
                    case GemType.Goal:
                        gemIdString = "&goal_id=";
                        break;
                    case GemType.Event:
                        gemIdString = "&event_id=";
                        break;
                    case GemType.Action:
                        gemIdString = "&goalaction_id=";
                        break;
                    case GemType.Emotion:
                        gemIdString = "&emotion_id=";
                        break;
                    default:
                        break;
                }

                string uriString = "api.php?action=deletemedia"+ gemIdString + gemId+"&media_file=" + mediaName ;

                var response = await client.GetAsync(uriString);

                if (response != null && response.StatusCode == HttpStatusCode.OK)
                {
                    var responseJson = response.Content.ReadAsStringAsync().Result;
                    var rootobject = JsonConvert.DeserializeObject<CodeAndTextOnlyResponce>(responseJson);
                    if (rootobject != null && rootobject.code != null)
                    {
                        return rootobject.code;
                    }
                }

            }
            catch (Exception ex)
            {
                var test = ex.Message;
            }

            return "404";
        }
开发者ID:praveenmohanmm,项目名称:PurposeColor_Bkp_Code,代码行数:54,代码来源:ServiceHelper.cs


示例13: AddToFavorite

        public static async Task<string> AddToFavorite(string userId, string gemId, GemType gemType)
        {
            if (!CrossConnectivity.Current.IsConnected)
            {
                return "404";
            }

            try
            {
                string result = String.Empty;
                var client = new HttpClient();
                client.Timeout = new TimeSpan(0, 15, 0);
                client.BaseAddress = new Uri(Constants.SERVICE_BASE_URL);
                client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "multipart/form-data");

                var url = "api.php?action=addtofavorite";

                MultipartFormDataContent content = new MultipartFormDataContent();

                content.Add(new StringContent(userId, Encoding.UTF8), "user_id");

                switch (gemType)
                {
                    case GemType.Goal:
                        content.Add(new StringContent(gemId, Encoding.UTF8), "goal_id");
                        break;
                    case GemType.Event:
                        content.Add(new StringContent(gemId, Encoding.UTF8), "event_id");
                        break;
                    case GemType.Action:
                        content.Add(new StringContent(gemId, Encoding.UTF8), "goalaction_id");
                        break;
                    case GemType.Emotion:
                        break;
                    default:
                        break;
                }

                HttpResponseMessage response = null;
                try
                {
                    response = await client.PostAsync(url, content);
                }
                catch (Exception ex)
                {
                    var test = ex.Message;
                }

                if (response != null && response.StatusCode == HttpStatusCode.OK)
                {
                    var eventsJson = response.Content.ReadAsStringAsync().Result;
                    var rootobject = JsonConvert.DeserializeObject<ResultJSon>(eventsJson);
                    if (rootobject.code != null)
                    {
                        client.Dispose();
                        return rootobject.code;
                    }
                }

                client.Dispose();
            }
            catch (Exception ex)
            {
                var test = ex.Message;
            }

            return "404";
        }
开发者ID:praveenmohanmm,项目名称:PurposeColor_Bkp_Code,代码行数:68,代码来源:ServiceHelper.cs


示例14: GetComments

        public static async Task<List<Comment>> GetComments(string gemId, GemType gemType, bool isCommunityGem = false)
        {
            if (!CrossConnectivity.Current.IsConnected)
            {
                return null;
            }

            try
            {
                string result = String.Empty;
                var client = new HttpClient();
                client.Timeout = new TimeSpan(0, 15, 0);
                client.BaseAddress = new Uri(Constants.SERVICE_BASE_URL);
                client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "multipart/form-data");

                var url = "api.php?action=getcomments";

                MultipartFormDataContent content = new MultipartFormDataContent();


                switch (gemType)
                {
                    case GemType.Goal:
                        content.Add(new StringContent(gemId, Encoding.UTF8), "goal_id");
                        break;
                    case GemType.Event:
                        content.Add(new StringContent(gemId, Encoding.UTF8), "event_id");
                        break;
                    case GemType.Action:
                        content.Add(new StringContent(gemId, Encoding.UTF8), "goalaction_id");
                        break;
                    case GemType.Emotion:
                        break;
                    default:
                        break;
                }

                if (isCommunityGem)
                {
                    content.Add(new StringContent("1", Encoding.UTF8), "share_comment");
                }
                else
                {
                    content.Add(new StringContent("0", Encoding.UTF8), "share_comment");
                }

                HttpResponseMessage response = await client.PostAsync(url, content);

                if (response != null && response.StatusCode == HttpStatusCode.OK)
                {
                    var eventsJson = response.Content.ReadAsStringAsync().Result;
                    var rootobject = JsonConvert.DeserializeObject<GetCommentsResult>(eventsJson);
                    if (rootobject != null && rootobject.resultarray != null)
                    {
                        client.Dispose();
                        return rootobject.resultarray;
                    }
                }
                client.Dispose();
            }
            catch (Exception ex)
            {
                var test = ex.Message;
            }

            return null;
        }
开发者ID:praveenmohanmm,项目名称:PurposeColor_Bkp_Code,代码行数:67,代码来源:ServiceHelper.cs


示例15: CommunityGems

		//public GemsDetailsPage(List<EventMedia> mediaArray, List<ActionMedia> actionMediaArray, string pageTitleVal, string titleVal, string desc, string Media, string NoMedia, string gemId, GemType gemType)
		public CommunityGems(DetailsPageModel model)
		{
			NavigationPage.SetHasNavigationBar(this, false);
			masterLayout = new CustomLayout();
			masterLayout.BackgroundColor = Color.FromRgb(244, 244, 244);
			masterScroll = new ScrollView();
			masterScroll.IsClippedToBounds = true;
			masterScroll.BackgroundColor = Color.FromRgb(244, 244, 244);
			progressBar = DependencyService.Get<IProgressBar>();
			currentUser = App.Settings.GetUser ();

			modelObject = model;
			CurrentGemId = model.gemId;
			CurrentGemType = model.gemType;

			cancelToken = new CancellationTokenSource ();
			mainTitleBar = new PurposeColorTitleBar(Color.FromRgb(8, 135, 224), "Purpose Color", Color.Black, "back", false);
			mainTitleBar.imageAreaTapGestureRecognizer.Tapped += OnImageAreaTapGestureRecognizerTapped;
			subTitleBar = new CommunityGemSubTitleBar(Constants.SUB_TITLE_BG_COLOR, Constants.COMMUNITY_GEMS, true);
			subTitleBar.myGemsTapRecognizer.Tapped += async (object sender, EventArgs e) => 
			{
				IProgressBar progress = DependencyService.Get<IProgressBar>();
				progress.ShowProgressbar( "Loading Mygems.." );

				CommunityGemsObject myGems = await ServiceHelper.GetMyGemsDetails();
				if( myGems != null )
				{
					//communityGems = null;
					Navigation.PushAsync( new MyGemsPage( myGems ) );
					myGemsCount = myGems.resultarray.Count;
				}

				progress.HideProgressbar();

				/*	masterStack.Children.Clear();
				masterStackLayout.Children.Clear();
				masterScroll.Content = null;

				RenderGems( communityGems );*/


			};
			subTitleBar.BackButtonTapRecognizer.Tapped += async (object sender, EventArgs e) =>
			{
				try
				{
					App.masterPage.IsPresented = !App.masterPage.IsPresented;
				}
				catch (Exception)
				{
				}
			};


			this.Appearing += OnAppearing;




			Label pageTitle = new Label();
			pageTitle.Text = model.pageTitleVal;
			pageTitle.TextColor = Color.Black;
			pageTitle.FontFamily = Constants.HELVERTICA_NEUE_LT_STD;
			pageTitle.FontAttributes = FontAttributes.Bold;
			pageTitle.WidthRequest = App.screenWidth * 80 / 100;
			pageTitle.HeightRequest = 50;
			pageTitle.XAlign = TextAlignment.Start;
			pageTitle.YAlign = TextAlignment.Start;
			pageTitle.FontSize = Device.OnPlatform(15, 20, 15);

			BoxView emptyLayout = new BoxView();
			emptyLayout.BackgroundColor = Color.Transparent;
			emptyLayout.WidthRequest = App.screenWidth * 90 / 100;
			emptyLayout.HeightRequest = 30;

			masterStackLayout = new StackLayout();
			masterStackLayout.Orientation = StackOrientation.Vertical;

			TapGestureRecognizer chatTap = new TapGestureRecognizer ();
			Image chat = new Image ();
			chat.Source = "chat.png";
			chat.Aspect = Aspect.Fill;
			chat.WidthRequest = App.screenWidth * 16 / 100;
			chat.HeightRequest = App.screenWidth * 12 / 100;
			chat.GestureRecognizers.Add ( chatTap );
			chatTap.Tapped += async (object sender, EventArgs e) => 
			{
				await Navigation.PushAsync( new ChatPage() );
			};

			masterLayout.AddChildToLayout(mainTitleBar, 0, 0);
			masterLayout.AddChildToLayout(chat, 80, 1);
			masterLayout.AddChildToLayout(subTitleBar, 0, Device.OnPlatform(9, 10, 10));
			masterLayout.AddChildToLayout(masterScroll, -1, 18);

			masterScroll.Scrolled += OnMasterScrollScrolled;

			Content = masterLayout;
		}
开发者ID:praveenmohanmm,项目名称:PurposeColor_Bkp_Code,代码行数:100,代码来源:CommunityGems.cs


示例16: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
                case 7:
                    {
                        m_SAAbsorptionAttributes = new SAAbsorptionAttributes(this, reader);
                        goto case 6;
                    }
				case 6:
				{
                        if (version == 6)
                            m_SAAbsorptionAttributes = new SAAbsorptionAttributes(this);

					m_MaxHitPoints = reader.ReadEncodedInt();
					m_HitPoints = reader.ReadEncodedInt();

					goto case 5;
				}
				//personal bless deed
				case 5:
				{
					m_BlessedBy = reader.ReadMobile();
					goto case 4;
				}
				#region Mondain's Legacy Sets
				case 4:
				{
					m_LastEquipped = reader.ReadBool();
					m_SetEquipped = reader.ReadBool();
					m_SetHue = reader.ReadEncodedInt();

					m_SetAttributes = new AosAttributes( this, reader );
					m_SetSkillBonuses = new AosSkillBonuses( this, reader );

					goto case 3;
				}
				#endregion
				#region Mondain's Legacy
				case 3:
				{
					m_Crafter = reader.ReadMobile();
					m_Quality = (ArmorQuality) reader.ReadInt();
										
					goto case 2;
				}
				#endregion
				case 2:
				{
					m_Resource = (CraftResource)reader.ReadEncodedInt();
					m_GemType = (GemType)reader.ReadEncodedInt();

					goto case 1;
				}
				case 1:
				{
					m_AosAttributes = new AosAttributes( this, reader );
					m_AosResistances = new AosElementAttributes( this, reader );
					m_AosSkillBonuses = new AosSkillBonuses( this, reader );

					if ( Core.AOS && Parent is Mobile )
						m_AosSkillBonuses.AddTo( (Mobile)Parent );

					int strBonus = m_AosAttributes.BonusStr;
					int dexBonus = m_AosAttributes.BonusDex;
					int intBonus = m_AosAttributes.BonusInt;

					if ( Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0) )
					{
						Mobile m = (Mobile)Parent;

						string modName = Serial.ToString();

						if ( strBonus != 0 )
							m.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );

						if ( dexBonus != 0 )
							m.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero ) );

						if ( intBonus != 0 )
							m.AddStatMod( new StatMod( StatType.Int, modName + "Int", intBonus, TimeSpan.Zero ) );
					}

					if ( Parent is Mobile )
						((Mobile)Parent).CheckStatTimers();

					break;
				}
				case 0:
				{
					m_AosAttributes = new AosAttributes( this );
					m_AosResistances = new AosElementAttributes( this );
					m_AosSkillBonuses = new AosSkillBonuses( this );

					break;
				}
//.........这里部分代码省略.........
开发者ID:romeov007,项目名称:imagine-uo,代码行数:101,代码来源:BaseJewel.cs


示例17: BaseJewel

        public BaseJewel(int itemID, Layer layer)
            : base(itemID)
        {
            this.m_AosAttributes = new AosAttributes(this);
            this.m_AosResistances = new AosElementAttributes(this);
            this.m_AosSkillBonuses = new AosSkillBonuses(this);
            this.m_Resource = CraftResource.Iron;
            this.m_GemType = GemType.None;

            this.Layer = layer;

            this.m_HitPoints = this.m_MaxHitPoints = Utility.RandomMinMax(this.InitMinHits, this.InitMaxHits);

            this.m_SetAttributes = new AosAttributes(this);
            this.m_SetSkillBonuses = new AosSkillBonuses(this);
            this.m_SAAbsorptionAttributes = new SAAbsorptionAttributes(this);
            m_NegativeAttributes = new NegativeAttributes(this);
        }
开发者ID:Ravenwolfe,项目名称:ServUO,代码行数:18,代码来源:BaseJewel.cs


示例18: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				#region ItemID_Mods
				case (3):
				{
				m_Identified = reader.ReadBool();
				goto case 2;
				}
				#endregion
				case 2:
				{
					m_Resource = (CraftResource)reader.ReadEncodedInt();
					m_GemType = (GemType)reader.ReadEncodedInt();

					goto case 1;
				}
				case 1:
				{
					m_AosAttributes = new AosAttributes( this, reader );
					m_AosResistances = new AosElementAttributes( this, reader );
					m_AosSkillBonuses = new AosSkillBonuses( this, reader );

					if ( Core.AOS && Parent is Mobile )
						m_AosSkillBonuses.AddTo( (Mobile)Parent );

					int strBonus = m_AosAttributes.BonusStr;
					int dexBonus = m_AosAttributes.BonusDex;
					int intBonus = m_AosAttributes.BonusInt;

					if ( Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0) )
					{
						Mobile m = (Mobile)Parent;

						string modName = Serial.ToString();

						if ( strBonus != 0 )
							m.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );

						if ( dexBonus != 0 )
							m.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero ) );

						if ( intBonus != 0 )
							m.AddStatMod( new StatMod( StatType.Int, modName + "Int", intBonus, TimeSpan.Zero ) );
					}

					if ( Parent is Mobile )
						((Mobile)Parent).CheckStatTimers();

					break;
				}
				case 0:
				{
					m_AosAttributes = new AosAttributes( this );
					m_AosResistances = new AosElementAttributes( this );
					m_AosSkillBonuses = new AosSkillBonuses( this );

					break;
				}
			}

			if ( version < 2 )
			{
				m_Resource = CraftResource.Iron;
				m_GemType = GemType.None;
			}
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:72,代码来源:BaseJewel.cs


示例19: AddEventsSituationsOrThoughts


//.........这里部分代码省略.........
            //}
            masterLayout.AddChildToLayout(eventTitle, 5, 11);

            #endregion

            #region EVENT DESCRIPTION

            eventDescription = new CustomEditor
            {
                VerticalOptions = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                HeightRequest = 100,
                Placeholder = pageTitle,
                BackgroundColor = Color.White
            };
			eventDescription.TextChanged += EventDescription_TextChanged;
				

            eventDescription.WidthRequest = textInputWidth;

            if (detailsPageModel != null)
            {
				if (detailsPageModel.IsCopyingGem) {
					isUpdatePage = false;
				}
				else
				{
					isUpdatePage = true;
				}

                currentGemId = detailsPageModel.gemId;
                if (detailsPageModel.gemType != null)
                {
                    currentGemType = detailsPageModel.gemType;
                    switch (currentGemType)
                    {
                        case GemType.Goal:
                            pageTitle = Constants.EDIT_GOALS;
                            break;
                        case GemType.Event:
                            pageTitle = Constants.EDIT_EVENTS;
                            break;
                        case GemType.Action:
                            pageTitle = Constants.EDIT_ACTIONS;
                            break;
                        default:
                            break;
                    }
                }
                
                if (detailsPageModel.titleVal != null)
                {
                    eventTitle.Text = detailsPageModel.titleVal;
                }
                if ( detailsPageModel.description != null)
	            {
		             eventDescription.Text = detailsPageModel.description;
	            }
            }

            #endregion

            #region MEDIA INPUTS

            Image pinButton = new Image
            {
开发者ID:praveenmohanmm,项目名称:PurposeColor_Bkp_Code,代码行数:67,代码来源:AddEventsSituationsOrThoughts.cs


示例20: BaseJewel

		public BaseJewel( int itemID, Layer layer ) : base( itemID )
		{
			m_AosAttributes = new AosAttributes( this );
			m_AosResistances = new AosElementAttributes( this );
			m_AosSkillBonuses = new AosSkillBonuses( this );
			m_Resource = CraftResource.Iron;
			m_GemType = GemType.None;

			Layer = layer;

			#region Mondain's Legacy Sets
			m_SetAttributes = new AosAttributes( this );
			m_SetSkillBonuses = new AosSkillBonuses( this );
			#endregion
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:15,代码来源:BaseJewel.cs



注:本文中的GemType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gender类代码示例发布时间:2022-05-24
下一篇:
C# Gear类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap