本文整理汇总了C#中PlayerData.SetTips方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerData.SetTips方法的具体用法?C# PlayerData.SetTips怎么用?C# PlayerData.SetTips使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerData
的用法示例。
在下文中一共展示了PlayerData.SetTips方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Save
/**
* Saves all relevant data to a file based on the
* integer input
* NOTE: This does not perform a write back but
* rather creates a fresh file every time.
*/
public void Save()
{
BinaryFormatter bf = new BinaryFormatter();
FileStream file = File.Create(Application.persistentDataPath + "/" + save_name + ".dat");
PlayerData data = new PlayerData();
// Insert data from controller to data object
// ie: data.setExp(this.getExp());
data.SetStone(this.GetStone());
data.SetCoin(this.GetCoin());
data.SetFood(this.GetFood());
data.SetSilk(this.GetSilk());
data.SetLumber(this.GetLumber());
data.SetEnergy(this.GetEnergy());
data.SetMorale(this.GetMorale());
data.SetGrid (this.ConvertMatrix (this.GetGrid ()));
data.SetBuildings (this.GetBuildings ());
data.SetInput (this.GetInput ());
data.SetTips (this.GetTips ());
data.SetButtonTexts (this.GetButtonTexts());
data.SetHealth(this.GetHealth());
data.SetExperience(this.GetExperience());
data.SetLabel(this.GetLabel());
bf.Serialize(file, data);
file.Close();
}