本文整理汇总了C#中GameData.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# GameData.ToString方法的具体用法?C# GameData.ToString怎么用?C# GameData.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameData
的用法示例。
在下文中一共展示了GameData.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
public static bool Load()
{
Debug.Log("Trying to load from " + Application.persistentDataPath);
if (File.Exists(Application.persistentDataPath + "/savedData.gd"))
{
BinaryFormatter bf = new BinaryFormatter();
FileStream file = File.Open(Application.persistentDataPath + "/savedData.gd", FileMode.Open);
savedData = (GameData)bf.Deserialize(file);
file.Close();
Debug.Log("Data Loaded from : " + Application.persistentDataPath);
Debug.Log("Data : " + savedData.ToString());
return true;
}
return false;
}
示例2: PillarWon
public void PillarWon(GameData.PillarType pillar)
{
Debug.Log("Won A Pillar: " + pillar.ToString());
redPillar.SetActive(false);
bluePillar.SetActive(false);
greenPillar.SetActive(false);
yellowPillar.SetActive(false);
purplePillar.SetActive(false);
orangePillar.SetActive(false);
switch (pillar)
{
case GameData.PillarType.Blue:
bluePillar.SetActive(true);
break;
case GameData.PillarType.Red:
redPillar.SetActive(true);
break;
case GameData.PillarType.Green:
greenPillar.SetActive(true);
break;
case GameData.PillarType.Orange:
orangePillar.SetActive(true);
break;
case GameData.PillarType.Purple:
purplePillar.SetActive(true);
break;
case GameData.PillarType.Yellow:
yellowPillar.SetActive(true);
Debug.Log("yellow");
break;
}
}