當前位置: 首頁>>代碼示例>>C#>>正文


C# Blob.GetBlobStateString方法代碼示例

本文整理匯總了C#中Blob.GetBlobStateString方法的典型用法代碼示例。如果您正苦於以下問題:C# Blob.GetBlobStateString方法的具體用法?C# Blob.GetBlobStateString怎麽用?C# Blob.GetBlobStateString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Blob的用法示例。


在下文中一共展示了Blob.GetBlobStateString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: UpdateBreedButton

	public void UpdateBreedButton(Blob blob)
	{
		breedButton.isEnabled = true;

		if(blob.spouseId == -1)
		{
			breedButton.isEnabled = true;
			breedButtonLabel.text = "Find a Partner";
		}
		else
		{
			breedButton.isEnabled = (theBlob.female ? (theBlob.unfertilizedEggs > 0) : (theBlob.GetSpouse().unfertilizedEggs > 0));
			breedButtonLabel.text = "Breed";
			UpdateBreedCost();
		}
		
		bool isIdle = blob.GetBlobStateString() == "";
		breedButton.isEnabled = !isIdle ? false : breedButton.isEnabled;
	}
開發者ID:mcdonnellv,項目名稱:BlobsPrototype,代碼行數:19,代碼來源:InfoPanel.cs

示例2: UpdateWithBlob

	public void UpdateWithBlob(Blob blob)
	{
		theBlob = blob;

		if (blob == null)
		{
			UpdateAsNull();
			return;
		}

		if (!blob.hasHatched)
		{
			UpdateAsEgg();
			return;
		}

		blob.OrderGenes();
		genePanel.gameObject.SetActive(false);//blob.hasHatched);
		hatchButton.gameObject.SetActive(false);
		addEggButton.gameObject.SetActive(theBlob.female);
		breedButton.gameObject.SetActive(true);
		moveButton.gameObject.SetActive(true);
		deleteButton.gameObject.SetActive(true);
		progress.gameObject.SetActive(false);
		body.gameObject.SetActive(true);
		face.gameObject.SetActive(true);
		cheeks.gameObject.SetActive(!blob.male);
		egg.gameObject.SetActive(false);
		Texture tex = blob.bodyPartSprites["Body"];
		body.spriteName = tex.name;
		tex = blob.bodyPartSprites["Eyes"];
		face.spriteName = tex.name;
		body.color = blob.color;
		bg.color = (blob.male) ? new Color(0.62f, 0.714f, 0.941f,1f) : new Color(0.933f, 0.604f, 0.604f, 1f);
		eggsLabel.text = blob.unfertilizedEggs.ToString() + " eggs left";
		qualityLabel.text = blob.quality.ToString() + " quality";
		levelLabel.text = "Level   " + blob.level.ToString();
		if (blob.male)
		{
			genderLabel.text = "Male";
			eggsLabel.text = "";
		}
		else
			genderLabel.text = "Female";

		int pixels = (int)(blob.BlobScale() * 50f);
		body.SetDimensions(pixels, pixels);
		face.SetDimensions(pixels, pixels);
		cheeks.SetDimensions(pixels, pixels);

		//UpdateGenePanel()
		UpdateBreedButton(blob);

		moveButton.isEnabled = false;


		bool isIdle = blob.GetBlobStateString() == "";
		moveButton.isEnabled = false;
		deleteButton.isEnabled = isIdle;
		addEggButton.isEnabled = !isIdle ? false : addEggButton.isEnabled;
		UpdateSellValue();
	}
開發者ID:mcdonnellv,項目名稱:BlobsPrototype,代碼行數:62,代碼來源:InfoPanel.cs


注:本文中的Blob.GetBlobStateString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。