本文整理汇总了C#中UserData.AddGold方法的典型用法代码示例。如果您正苦于以下问题:C# UserData.AddGold方法的具体用法?C# UserData.AddGold怎么用?C# UserData.AddGold使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserData
的用法示例。
在下文中一共展示了UserData.AddGold方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Awake
// Use this for initialization
void Awake()
{
string data = PlayerPrefs.GetString("Vote");
if (string.IsNullOrEmpty(data) == false)
{
var b = new BinaryFormatter();
var m = new MemoryStream(Convert.FromBase64String(data));
savedAccountData = (ClientSaveData)b.Deserialize(m);
}
if (savedAccountData == null)
{
savedAccountData = new ClientSaveData();
savedAccountData.Save();
}
if (savedAccountData.Version < 1001)
{
savedAccountData.Vibe = 1;
savedAccountData.Sound = 1;
savedAccountData.Version = 1001;
}
//IntraTraceModule.Instance.AddTraceLine("LOAD");
savedAccountData.Print();
BGCollider = GameObject.Instantiate(Resources.Load("Prefabs/UI/Component/BGCollider")) as GameObject;
BGCollider.transform.parent = GameObject.Find("UI Root").transform;
BGCollider.transform.localScale = Vector3.one;
BGCollider.SetActive(false);
muhanscore = 0;
DontDestroyOnLoad(this.gameObject);
DataManager.Get();
state = GameState.TITLE;
main_state = UIManager.ID.LOBBY;
ModifySetting();
Application.targetFrameRate = 60;
//UserData Initialize
User = new UserData();
User.Name = "임시";
User.Level = 1;
User.AddGold(0);
User.Need_Exp = (User.Level + 2) * 720;
User.Exp = 380;
User.Ruby = 100;
User.party.member = new CharacterStatus[3];
//temp chardata
CharacterData chardata;
BulletData bulletdata;
char_count = DataManager.Get().CharDatas.Count;
quest_count = DataManager.Get().QuestDatas.Count - 1;
CharacterInfo = new CharacterStatus[char_count];
QuestInfo = new QuestData[quest_count];
charnum = new int[char_count];
queststate = new int[quest_count];
questscore = new int[quest_count];
for (int i = 0; i < quest_count; i++)
queststate[i] = 0;
for (int i = 0; i < char_count; i++)
{
charnum[i] = (i + 1) * 10000 + 101;
DataManager.Get().CharDatas.TryGetValue(i + 1, out chardata);
DataManager.Get().LevelDatas.TryGetValue(charnum[i], out leveldata);
if (chardata == null)
{
////Debug.log("character data missing");
}
CharacterInfo[i] = new CharacterStatus();
CharacterInfo[i].num = i;
CharacterInfo[i].charon = false;
CharacterInfo[i].index = chardata.Index;
CharacterInfo[i].My_Level = charnum[i] % 100;
CharacterInfo[i].char_name = chardata.ResourceName + ((charnum[i] / 100) % 100).ToString();
CharacterInfo[i].char_hanname = chardata.Name;
CharacterInfo[i].attribute = (Attribute)chardata.Attribute;
CharacterInfo[i].char_MP = chardata.ManaPoint;
CharacterInfo[i].char_HP = leveldata.HealthPoint + ((leveldata.HealthPoint*0.01f) * User.Level * 0.6f);
CharacterInfo[i].char_ATK = leveldata.AttackPoint + ((leveldata.AttackPoint*0.01f) * User.Level * 0.3f);
CharacterInfo[i].char_SPD = chardata.Speed;
CharacterInfo[i].Askill_num = chardata.SkillIndex;
CharacterInfo[i].Askill_name = chardata.SkillName;
CharacterInfo[i].Askill_info = chardata.SkillDesc;
CharacterInfo[i].Askill_MP = chardata.SkillManaCost;
CharacterInfo[i].bullet_num = chardata.BulletIndex;
DataManager.Get().BulletDatas.TryGetValue(CharacterInfo[i].bullet_num, out bulletdata);
if (bulletdata == null)
{
Debug.Log("bullet data missing");
GameObject.Find("GameManager").SendMessage("GotoMain");
//.........这里部分代码省略.........