{"action":"created","comment":{"url":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/comments/236952386","pull_request_review_id":179136970,"id":236952386,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjk1MjM4Ng==","diff_hunk":"@@ -0,0 +1,393 @@\n+﻿using System.Collections;\n+using System.Collections.Generic;\n+using UnityEngine;\n+/// <summary>\n+/// TBD:GiftList / Connection with ChoiceManager / Equipment\n+/// </summary>\n+public enum SkillTypeEnum\n+{\n+    fishing, hunting, medicine, cooking, \n+    music, chess, write, draw\n+}\n+\n+public class PlayerManager : IGameManager\n+{\n+    private int _curHP = 10;\n+    private int _maxHP = 10;\n+    private float _hpFillAmount;\n+    private int _curMP = 3;\n+    private int _maxMP = 5;\n+    private float _mpFillAmount;\n+\n+    private int _geValue = 0;\n+    private int _maxGEValue = 100;\n+    private int _minGEValue = -100;\n+\n+    private int _fameValue = 0;\n+    private int _maxFameValue = 100;\n+    private int _minFameValue = 0;\n+\n+    private int _shenFaValue = 2;\n+    private int _maxShenFaValue = 100;\n+    private int _minShenFaValue = 1;\n+\n+    private int _luckValue = 0;\n+    private int _maxLuckValue = 100;\n+    private int _minLuckValue = -100;\n+\n+    private int _fishingSkillValue = 1;\n+    private int _huntingSkillValue = 1;\n+    private int _medicineSkillValue = 1;\n+    private int _cookingSkillValue = 1;\n+    private int _musicSkillValue = 1;\n+    private int _chessSkillValue = 1;\n+    private int _writeSkillValue = 1;\n+    private int _drawSkillValue = 1;\n+    private int _maxSkillValue = 100;\n+\n+    private List<Buff> _listBuff = new List<Buff>();\n+\n+    \n+\n+    private string _playerName = \"贾健程\";\n+    \n+\n+    public PlayerManager(MainSceneTreeNodeManager center) : base(center)\n+    {\n+\n+    }\n+\n+    public override void Initialize()\n+    {\n+        InitializePlayerBuffList();\n+        InitializePlayerValue();\n+    }\n+\n+    public override void Release()\n+    {\n+    }\n+\n+    public override void Update()\n+    {\n+    }\n+\n+    public override void FixedUpdate()\n+    {\n+    }\n+\n+    private void InitializePlayerValue()\n+    {\n+        SetHpFillAmount();\n+        SetMpFillAmount();\n+    }\n+\n+    private void InitializePlayerBuffList()\n+    {\n+        List<string> buffKeyList = StaticData.Instance.InitializeTestBuffList();\n+\n+        foreach(string key in buffKeyList)\n+        {\n+            BuffData data= StaticData.Instance.GetBuffDataFromDic(key);\n+\n+            if (data != null)\n+            {\n+                Buff buff = new Buff(data);\n+                _listBuff.Add(buff);\n+            }\n+            else\n+                continue;\n+        }\n+\n+    }\n+\n+    public int GetCurHp()\n+    {\n+        return _curHP;\n+    }\n+\n+    public int GetMaxHp()\n+    {\n+        return _maxHP;\n+    }\n+\n+    public bool ChangeCurHp(int changeValue)\n+    {\n+        int tempHp = _curHP + changeValue;\n+\n+        if (tempHp < 0)\n+            return false;\n+        \n+        tempHp = Mathf.Min(tempHp, _maxHP);\n+\n+        _curHP = tempHp;\n+        return true;\n+    }\n+\n+    public bool ChangeMaxHp(int changeValue)\n+    {\n+        int tempValue = _maxHP + changeValue;\n+\n+        if (tempValue <= 0)\n+            return false;\n+\n+        if (tempValue < _curHP)\n+            _curHP = tempValue;\n+\n+        _maxHP = tempValue;\n+        return true;\n+    }\n+\n+    public void FullUpHp()\n+    {\n+        _curHP = _maxHP;\n+    }\n+\n+    public int GetCurMp()\n+    {\n+        return _curMP;\n+    }\n+\n+    public int GetMaxMp()\n+    {\n+        return _maxMP;\n+    }\n+\n+    public bool ChangeCurMp(int changeValue)\n+    {\n+        int tempCurMp = _curMP + changeValue;\n+\n+        if (tempCurMp < 0)\n+            return false;\n+\n+        if (tempCurMp > _maxMP)\n+            tempCurMp = _maxMP;\n+\n+        _curMP = tempCurMp;\n+        return true;\n+    }\n+\n+    public bool ChangeMaxMp(int changeValue)\n+    {\n+        int tempMaxMp = _maxMP + changeValue;\n+\n+        if (tempMaxMp < 0)\n+            return false;\n+\n+        if (_curMP > tempMaxMp)\n+            _curMP = tempMaxMp;\n+\n+        _maxMP = tempMaxMp;\n+        return true;\n+    }\n+\n+    public void FullUpMp()\n+    {\n+        _curMP = _maxMP;\n+    }\n+\n+    public void SetHpFillAmount()\n+    {\n+        _hpFillAmount = (float)_curHP / _maxHP;\n+    }\n+\n+    public void SetMpFillAmount()\n+    {\n+        float fillAmount;\n+        if (_curMP == 0)","path":"Prototype/Assets/Scripts/MainScene/SubManagers/PlayerManager/PlayerManager.cs","position":196,"original_position":196,"commit_id":"6949611add434fe2a36c64151b2398d5cff6cd54","original_commit_id":"6949611add434fe2a36c64151b2398d5cff6cd54","user":{"login":"wcgary0608","id":44281997,"node_id":"MDQ6VXNlcjQ0MjgxOTk3","avatar_url":"https://avatars1.githubusercontent.com/u/44281997?v=4","gravatar_id":"","url":"https://api.github.com/users/wcgary0608","html_url":"https://github.com/wcgary0608","followers_url":"https://api.github.com/users/wcgary0608/followers","following_url":"https://api.github.com/users/wcgary0608/following{/other_user}","gists_url":"https://api.github.com/users/wcgary0608/gists{/gist_id}","starred_url":"https://api.github.com/users/wcgary0608/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcgary0608/subscriptions","organizations_url":"https://api.github.com/users/wcgary0608/orgs","repos_url":"https://api.github.com/users/wcgary0608/repos","events_url":"https://api.github.com/users/wcgary0608/events{/privacy}","received_events_url":"https://api.github.com/users/wcgary0608/received_events","type":"User","site_admin":false},"body":"所有的if 后面 记得加 {} 大括号哦","created_at":"2018-11-28T06:23:42Z","updated_at":"2018-11-28T06:47:08Z","html_url":"https://github.com/wcgary0608/Prototype02/pull/3#discussion_r236952386","pull_request_url":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/3","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/comments/236952386"},"html":{"href":"https://github.com/wcgary0608/Prototype02/pull/3#discussion_r236952386"},"pull_request":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/3","id":232680003,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNjgwMDAz","html_url":"https://github.com/wcgary0608/Prototype02/pull/3","diff_url":"https://github.com/wcgary0608/Prototype02/pull/3.diff","patch_url":"https://github.com/wcgary0608/Prototype02/pull/3.patch","issue_url":"https://api.github.com/repos/wcgary0608/Prototype02/issues/3","number":3,"state":"open","locked":false,"title":"Attach MenuUI choicesBtn with scripts / start designing PlayerManager","user":{"login":"jxue1012","id":19838386,"node_id":"MDQ6VXNlcjE5ODM4Mzg2","avatar_url":"https://avatars2.githubusercontent.com/u/19838386?v=4","gravatar_id":"","url":"https://api.github.com/users/jxue1012","html_url":"https://github.com/jxue1012","followers_url":"https://api.github.com/users/jxue1012/followers","following_url":"https://api.github.com/users/jxue1012/following{/other_user}","gists_url":"https://api.github.com/users/jxue1012/gists{/gist_id}","starred_url":"https://api.github.com/users/jxue1012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxue1012/subscriptions","organizations_url":"https://api.github.com/users/jxue1012/orgs","repos_url":"https://api.github.com/users/jxue1012/repos","events_url":"https://api.github.com/users/jxue1012/events{/privacy}","received_events_url":"https://api.github.com/users/jxue1012/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-21T14:19:07Z","updated_at":"2018-11-28T06:47:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f981fd69c2bf4ae9425b7f5e46074b2352945126","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/3/commits","review_comments_url":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/3/comments","review_comment_url":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wcgary0608/Prototype02/issues/3/comments","statuses_url":"https://api.github.com/repos/wcgary0608/Prototype02/statuses/6949611add434fe2a36c64151b2398d5cff6cd54","head":{"label":"wcgary0608:v0.2","ref":"v0.2","sha":"6949611add434fe2a36c64151b2398d5cff6cd54","user":{"login":"wcgary0608","id":44281997,"node_id":"MDQ6VXNlcjQ0MjgxOTk3","avatar_url":"https://avatars1.githubusercontent.com/u/44281997?v=4","gravatar_id":"","url":"https://api.github.com/users/wcgary0608","html_url":"https://github.com/wcgary0608","followers_url":"https://api.github.com/users/wcgary0608/followers","following_url":"https://api.github.com/users/wcgary0608/following{/other_user}","gists_url":"https://api.github.com/users/wcgary0608/gists{/gist_id}","starred_url":"https://api.github.com/users/wcgary0608/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcgary0608/subscriptions","organizations_url":"https://api.github.com/users/wcgary0608/orgs","repos_url":"https://api.github.com/users/wcgary0608/repos","events_url":"https://api.github.com/users/wcgary0608/events{/privacy}","received_events_url":"https://api.github.com/users/wcgary0608/received_events","type":"User","site_admin":false},"repo":{"id":158347593,"node_id":"MDEwOlJlcG9zaXRvcnkxNTgzNDc1OTM=","name":"Prototype02","full_name":"wcgary0608/Prototype02","private":false,"owner":{"login":"wcgary0608","id":44281997,"node_id":"MDQ6VXNlcjQ0MjgxOTk3","avatar_url":"https://avatars1.githubusercontent.com/u/44281997?v=4","gravatar_id":"","url":"https://api.github.com/users/wcgary0608","html_url":"https://github.com/wcgary0608","followers_url":"https://api.github.com/users/wcgary0608/followers","following_url":"https://api.github.com/users/wcgary0608/following{/other_user}","gists_url":"https://api.github.com/users/wcgary0608/gists{/gist_id}","starred_url":"https://api.github.com/users/wcgary0608/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcgary0608/subscriptions","organizations_url":"https://api.github.com/users/wcgary0608/orgs","repos_url":"https://api.github.com/users/wcgary0608/repos","events_url":"https://api.github.com/users/wcgary0608/events{/privacy}","received_events_url":"https://api.github.com/users/wcgary0608/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wcgary0608/Prototype02","description":"Rebased PRJ","fork":false,"url":"https://api.github.com/repos/wcgary0608/Prototype02","forks_url":"https://api.github.com/repos/wcgary0608/Prototype02/forks","keys_url":"https://api.github.com/repos/wcgary0608/Prototype02/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wcgary0608/Prototype02/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wcgary0608/Prototype02/teams","hooks_url":"https://api.github.com/repos/wcgary0608/Prototype02/hooks","issue_events_url":"https://api.github.com/repos/wcgary0608/Prototype02/issues/events{/number}","events_url":"https://api.github.com/repos/wcgary0608/Prototype02/events","assignees_url":"https://api.github.com/repos/wcgary0608/Prototype02/assignees{/user}","branches_url":"https://api.github.com/repos/wcgary0608/Prototype02/branches{/branch}","tags_url":"https://api.github.com/repos/wcgary0608/Prototype02/tags","blobs_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/refs{/sha}","trees_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wcgary0608/Prototype02/statuses/{sha}","languages_url":"https://api.github.com/repos/wcgary0608/Prototype02/languages","stargazers_url":"https://api.github.com/repos/wcgary0608/Prototype02/stargazers","contributors_url":"https://api.github.com/repos/wcgary0608/Prototype02/contributors","subscribers_url":"https://api.github.com/repos/wcgary0608/Prototype02/subscribers","subscription_url":"https://api.github.com/repos/wcgary0608/Prototype02/subscription","commits_url":"https://api.github.com/repos/wcgary0608/Prototype02/commits{/sha}","git_commits_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/commits{/sha}","comments_url":"https://api.github.com/repos/wcgary0608/Prototype02/comments{/number}","issue_comment_url":"https://api.github.com/repos/wcgary0608/Prototype02/issues/comments{/number}","contents_url":"https://api.github.com/repos/wcgary0608/Prototype02/contents/{+path}","compare_url":"https://api.github.com/repos/wcgary0608/Prototype02/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wcgary0608/Prototype02/merges","archive_url":"https://api.github.com/repos/wcgary0608/Prototype02/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wcgary0608/Prototype02/downloads","issues_url":"https://api.github.com/repos/wcgary0608/Prototype02/issues{/number}","pulls_url":"https://api.github.com/repos/wcgary0608/Prototype02/pulls{/number}","milestones_url":"https://api.github.com/repos/wcgary0608/Prototype02/milestones{/number}","notifications_url":"https://api.github.com/repos/wcgary0608/Prototype02/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wcgary0608/Prototype02/labels{/name}","releases_url":"https://api.github.com/repos/wcgary0608/Prototype02/releases{/id}","deployments_url":"https://api.github.com/repos/wcgary0608/Prototype02/deployments","created_at":"2018-11-20T07:23:17Z","updated_at":"2018-11-21T02:10:45Z","pushed_at":"2018-11-28T05:33:46Z","git_url":"git://github.com/wcgary0608/Prototype02.git","ssh_url":"git@github.com:wcgary0608/Prototype02.git","clone_url":"https://github.com/wcgary0608/Prototype02.git","svn_url":"https://github.com/wcgary0608/Prototype02","homepage":null,"size":27774,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"wcgary0608:master","ref":"master","sha":"872b8cbcf686e064a5fc960f3c55247653bbb601","user":{"login":"wcgary0608","id":44281997,"node_id":"MDQ6VXNlcjQ0MjgxOTk3","avatar_url":"https://avatars1.githubusercontent.com/u/44281997?v=4","gravatar_id":"","url":"https://api.github.com/users/wcgary0608","html_url":"https://github.com/wcgary0608","followers_url":"https://api.github.com/users/wcgary0608/followers","following_url":"https://api.github.com/users/wcgary0608/following{/other_user}","gists_url":"https://api.github.com/users/wcgary0608/gists{/gist_id}","starred_url":"https://api.github.com/users/wcgary0608/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcgary0608/subscriptions","organizations_url":"https://api.github.com/users/wcgary0608/orgs","repos_url":"https://api.github.com/users/wcgary0608/repos","events_url":"https://api.github.com/users/wcgary0608/events{/privacy}","received_events_url":"https://api.github.com/users/wcgary0608/received_events","type":"User","site_admin":false},"repo":{"id":158347593,"node_id":"MDEwOlJlcG9zaXRvcnkxNTgzNDc1OTM=","name":"Prototype02","full_name":"wcgary0608/Prototype02","private":false,"owner":{"login":"wcgary0608","id":44281997,"node_id":"MDQ6VXNlcjQ0MjgxOTk3","avatar_url":"https://avatars1.githubusercontent.com/u/44281997?v=4","gravatar_id":"","url":"https://api.github.com/users/wcgary0608","html_url":"https://github.com/wcgary0608","followers_url":"https://api.github.com/users/wcgary0608/followers","following_url":"https://api.github.com/users/wcgary0608/following{/other_user}","gists_url":"https://api.github.com/users/wcgary0608/gists{/gist_id}","starred_url":"https://api.github.com/users/wcgary0608/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcgary0608/subscriptions","organizations_url":"https://api.github.com/users/wcgary0608/orgs","repos_url":"https://api.github.com/users/wcgary0608/repos","events_url":"https://api.github.com/users/wcgary0608/events{/privacy}","received_events_url":"https://api.github.com/users/wcgary0608/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wcgary0608/Prototype02","description":"Rebased PRJ","fork":false,"url":"https://api.github.com/repos/wcgary0608/Prototype02","forks_url":"https://api.github.com/repos/wcgary0608/Prototype02/forks","keys_url":"https://api.github.com/repos/wcgary0608/Prototype02/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wcgary0608/Prototype02/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wcgary0608/Prototype02/teams","hooks_url":"https://api.github.com/repos/wcgary0608/Prototype02/hooks","issue_events_url":"https://api.github.com/repos/wcgary0608/Prototype02/issues/events{/number}","events_url":"https://api.github.com/repos/wcgary0608/Prototype02/events","assignees_url":"https://api.github.com/repos/wcgary0608/Prototype02/assignees{/user}","branches_url":"https://api.github.com/repos/wcgary0608/Prototype02/branches{/branch}","tags_url":"https://api.github.com/repos/wcgary0608/Prototype02/tags","blobs_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/refs{/sha}","trees_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wcgary0608/Prototype02/statuses/{sha}","languages_url":"https://api.github.com/repos/wcgary0608/Prototype02/languages","stargazers_url":"https://api.github.com/repos/wcgary0608/Prototype02/stargazers","contributors_url":"https://api.github.com/repos/wcgary0608/Prototype02/contributors","subscribers_url":"https://api.github.com/repos/wcgary0608/Prototype02/subscribers","subscription_url":"https://api.github.com/repos/wcgary0608/Prototype02/subscription","commits_url":"https://api.github.com/repos/wcgary0608/Prototype02/commits{/sha}","git_commits_url":"https://api.github.com/repos/wcgary0608/Prototype02/git/commits{/sha}","comments_url":"https://api.github.com/repos/wcgary0608/Prototype02/comments{/number}","issue_comment_url":"https://api.github.com/repos/wcgary0608/Prototype02/issues/comments{/number}","contents_url":"https://api.github.com/repos/wcgary0608/Prototype02/contents/{+path}","compare_url":"https://api.github.com/repos/wcgary0608/Prototype02/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wcgary0608/Prototype02/merges","archive_url":"https://api.github.com/repos/wcgary0608/Prototype02/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wcgary0608/Prototype02/downloads","issues_url":"https://api.github.com/repos/wcgary0608/Prototype02/issues{/number}","pulls_url":"https://api.github.com/repos/wcgary0608/Prototype02/pulls{/number}","milestones_url":"https://api.github.com/repos/wcgary0608/Prototype02/milestones{/number}","notifications_url":"https://api.github.com/repos/wcgary0608/Prototype02/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wcgary0608/Prototype02/labels{/name}","releases_url":"https://api.github.com/repos/wcgary0608/Prototype02/releases{/id}","deployments_url":"https://api.github.com/repos/wcgary0608/Prototype02/deployments","created_at":"2018-11-20T07:23:17Z","updated_at":"2018-11-21T02:10:45Z","pushed_at":"2018-11-28T05:33:46Z","git_url":"git://github.com/wcgary0608/Prototype02.git","ssh_url":"git@github.com:wcgary0608/Prototype02.git","clone_url":"https://github.com/wcgary0608/Prototype02.git","svn_url":"https://github.com/wcgary0608/Prototype02","homepage":null,"size":27774,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/3"},"html":{"href":"https://github.com/wcgary0608/Prototype02/pull/3"},"issue":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/issues/3"},"comments":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/wcgary0608/Prototype02/statuses/6949611add434fe2a36c64151b2398d5cff6cd54"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"wcgary0608"}}