{"action":"created","comment":{"url":"https://api.github.com/repos/HippoBaro/R-Type/pulls/comments/93940007","pull_request_review_id":14471096,"id":93940007,"diff_hunk":"@@ -32,67 +36,72 @@ class AAnimable : public IDrawable {\n     ///\n     ////////////////////////////////////////////////////\n     bool shouldUpdateFrame() const {\n-      // Enough time spent\n-      const size_t timeElapsed = static_cast<const size_t>(_clock.getElapsedTime().asMilliseconds());\n-      const size_t timeToNextFrame = this->_loopDuration / this->_frames.size();\n-\n-      // Is the animation in pause ?\n-      const bool loopIsOver = this->isLoopOver();\n-\n-      return\n-              timeElapsed > timeToNextFrame &&\n-              !_inPause &&\n-              !loopIsOver;\n+        // Enough time spent\n+        const size_t timeElapsed = static_cast<const size_t>(_clock.getElapsedTime().asMilliseconds());\n+        const size_t timeToNextFrame = this->_loopDuration / this->_frames.size();\n+\n+        // Is the animation in pause ?\n+        const bool loopEndReached = this->isLastFrame() && !this->_shouldLoop;\n+\n+        return (\n+                _shouldLoop &&\n+                (timeElapsed > timeToNextFrame) &&\n+                !_inPause &&\n+                !loopEndReached\n+        );\n     }\n \n     ////////////////////////////////////////////////////\n     /// \\brief Increases or decreases _currentFrame\n     ///\n     ////////////////////////////////////////////////////\n     void updateCurrentFrame() {\n-      _currentFrame++;\n-      if (this->isLoopOver())\n-      {\n-        if (_backAndForth)\n-          std::reverse(_frames.begin(), _frames.end());\n-        _currentFrame = 0;\n-      }\n-      _clock.restart();\n+        _currentFrame++;\n+        if (this->isLastFrame())\n+        {\n+            if (_backAndForth)\n+                std::reverse(_frames.begin(), _frames.end());\n+            _currentFrame = 0;\n+        }\n+        _clock.restart();\n+    }\n+\n+\n+    bool NeedRedraw() override {\n+        return this->shouldUpdateFrame();\n     }\n \n protected:\n+    // Customize animation\n+    void setScale(sf::Vector2f s) { this->_scale = s; }","path":"SharedLibs/Interfaces/AAnimable.hpp","position":76,"original_position":76,"commit_id":"271acc89f896228c1619a8f8b943db704ccb79cd","original_commit_id":"271acc89f896228c1619a8f8b943db704ccb79cd","user":{"login":"HippoBaro","id":6069928,"avatar_url":"https://avatars.githubusercontent.com/u/6069928?v=3","gravatar_id":"","url":"https://api.github.com/users/HippoBaro","html_url":"https://github.com/HippoBaro","followers_url":"https://api.github.com/users/HippoBaro/followers","following_url":"https://api.github.com/users/HippoBaro/following{/other_user}","gists_url":"https://api.github.com/users/HippoBaro/gists{/gist_id}","starred_url":"https://api.github.com/users/HippoBaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HippoBaro/subscriptions","organizations_url":"https://api.github.com/users/HippoBaro/orgs","repos_url":"https://api.github.com/users/HippoBaro/repos","events_url":"https://api.github.com/users/HippoBaro/events{/privacy}","received_events_url":"https://api.github.com/users/HippoBaro/received_events","type":"User","site_admin":false},"body":"merci de mettre tes setter en `const`","created_at":"2016-12-27T15:14:44Z","updated_at":"2016-12-27T15:15:48Z","html_url":"https://github.com/HippoBaro/R-Type/pull/93#discussion_r93940007","pull_request_url":"https://api.github.com/repos/HippoBaro/R-Type/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/HippoBaro/R-Type/pulls/comments/93940007"},"html":{"href":"https://github.com/HippoBaro/R-Type/pull/93#discussion_r93940007"},"pull_request":{"href":"https://api.github.com/repos/HippoBaro/R-Type/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/HippoBaro/R-Type/pulls/93","id":99401717,"html_url":"https://github.com/HippoBaro/R-Type/pull/93","diff_url":"https://github.com/HippoBaro/R-Type/pull/93.diff","patch_url":"https://github.com/HippoBaro/R-Type/pull/93.patch","issue_url":"https://api.github.com/repos/HippoBaro/R-Type/issues/93","number":93,"state":"open","locked":false,"title":"Fix le bug de duplication d'entités","user":{"login":"aguadoenzo","id":11411723,"avatar_url":"https://avatars.githubusercontent.com/u/11411723?v=3","gravatar_id":"","url":"https://api.github.com/users/aguadoenzo","html_url":"https://github.com/aguadoenzo","followers_url":"https://api.github.com/users/aguadoenzo/followers","following_url":"https://api.github.com/users/aguadoenzo/following{/other_user}","gists_url":"https://api.github.com/users/aguadoenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/aguadoenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguadoenzo/subscriptions","organizations_url":"https://api.github.com/users/aguadoenzo/orgs","repos_url":"https://api.github.com/users/aguadoenzo/repos","events_url":"https://api.github.com/users/aguadoenzo/events{/privacy}","received_events_url":"https://api.github.com/users/aguadoenzo/received_events","type":"User","site_admin":false},"body":"Fix #93 ","created_at":"2016-12-27T03:21:39Z","updated_at":"2016-12-27T15:15:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5a203abd054501e45bc58720728b4d923ba669f","assignee":{"login":"aguadoenzo","id":11411723,"avatar_url":"https://avatars.githubusercontent.com/u/11411723?v=3","gravatar_id":"","url":"https://api.github.com/users/aguadoenzo","html_url":"https://github.com/aguadoenzo","followers_url":"https://api.github.com/users/aguadoenzo/followers","following_url":"https://api.github.com/users/aguadoenzo/following{/other_user}","gists_url":"https://api.github.com/users/aguadoenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/aguadoenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguadoenzo/subscriptions","organizations_url":"https://api.github.com/users/aguadoenzo/orgs","repos_url":"https://api.github.com/users/aguadoenzo/repos","events_url":"https://api.github.com/users/aguadoenzo/events{/privacy}","received_events_url":"https://api.github.com/users/aguadoenzo/received_events","type":"User","site_admin":false},"assignees":[{"login":"aguadoenzo","id":11411723,"avatar_url":"https://avatars.githubusercontent.com/u/11411723?v=3","gravatar_id":"","url":"https://api.github.com/users/aguadoenzo","html_url":"https://github.com/aguadoenzo","followers_url":"https://api.github.com/users/aguadoenzo/followers","following_url":"https://api.github.com/users/aguadoenzo/following{/other_user}","gists_url":"https://api.github.com/users/aguadoenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/aguadoenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguadoenzo/subscriptions","organizations_url":"https://api.github.com/users/aguadoenzo/orgs","repos_url":"https://api.github.com/users/aguadoenzo/repos","events_url":"https://api.github.com/users/aguadoenzo/events{/privacy}","received_events_url":"https://api.github.com/users/aguadoenzo/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/HippoBaro/R-Type/milestones/2","html_url":"https://github.com/HippoBaro/R-Type/milestone/2","labels_url":"https://api.github.com/repos/HippoBaro/R-Type/milestones/2/labels","id":2195391,"number":2,"title":"Rendu final","description":"","creator":{"login":"HippoBaro","id":6069928,"avatar_url":"https://avatars.githubusercontent.com/u/6069928?v=3","gravatar_id":"","url":"https://api.github.com/users/HippoBaro","html_url":"https://github.com/HippoBaro","followers_url":"https://api.github.com/users/HippoBaro/followers","following_url":"https://api.github.com/users/HippoBaro/following{/other_user}","gists_url":"https://api.github.com/users/HippoBaro/gists{/gist_id}","starred_url":"https://api.github.com/users/HippoBaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HippoBaro/subscriptions","organizations_url":"https://api.github.com/users/HippoBaro/orgs","repos_url":"https://api.github.com/users/HippoBaro/repos","events_url":"https://api.github.com/users/HippoBaro/events{/privacy}","received_events_url":"https://api.github.com/users/HippoBaro/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":9,"state":"open","created_at":"2016-12-14T00:45:40Z","updated_at":"2016-12-27T03:21:39Z","due_on":"2017-01-04T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/HippoBaro/R-Type/pulls/93/commits","review_comments_url":"https://api.github.com/repos/HippoBaro/R-Type/pulls/93/comments","review_comment_url":"https://api.github.com/repos/HippoBaro/R-Type/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HippoBaro/R-Type/issues/93/comments","statuses_url":"https://api.github.com/repos/HippoBaro/R-Type/statuses/271acc89f896228c1619a8f8b943db704ccb79cd","head":{"label":"HippoBaro:ea_fix_entites_bug#92","ref":"ea_fix_entites_bug#92","sha":"271acc89f896228c1619a8f8b943db704ccb79cd","user":{"login":"HippoBaro","id":6069928,"avatar_url":"https://avatars.githubusercontent.com/u/6069928?v=3","gravatar_id":"","url":"https://api.github.com/users/HippoBaro","html_url":"https://github.com/HippoBaro","followers_url":"https://api.github.com/users/HippoBaro/followers","following_url":"https://api.github.com/users/HippoBaro/following{/other_user}","gists_url":"https://api.github.com/users/HippoBaro/gists{/gist_id}","starred_url":"https://api.github.com/users/HippoBaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HippoBaro/subscriptions","organizations_url":"https://api.github.com/users/HippoBaro/orgs","repos_url":"https://api.github.com/users/HippoBaro/repos","events_url":"https://api.github.com/users/HippoBaro/events{/privacy}","received_events_url":"https://api.github.com/users/HippoBaro/received_events","type":"User","site_admin":false},"repo":{"id":74242392,"name":"R-Type","full_name":"HippoBaro/R-Type","owner":{"login":"HippoBaro","id":6069928,"avatar_url":"https://avatars.githubusercontent.com/u/6069928?v=3","gravatar_id":"","url":"https://api.github.com/users/HippoBaro","html_url":"https://github.com/HippoBaro","followers_url":"https://api.github.com/users/HippoBaro/followers","following_url":"https://api.github.com/users/HippoBaro/following{/other_user}","gists_url":"https://api.github.com/users/HippoBaro/gists{/gist_id}","starred_url":"https://api.github.com/users/HippoBaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HippoBaro/subscriptions","organizations_url":"https://api.github.com/users/HippoBaro/orgs","repos_url":"https://api.github.com/users/HippoBaro/repos","events_url":"https://api.github.com/users/HippoBaro/events{/privacy}","received_events_url":"https://api.github.com/users/HippoBaro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HippoBaro/R-Type","description":"Epitech project","fork":false,"url":"https://api.github.com/repos/HippoBaro/R-Type","forks_url":"https://api.github.com/repos/HippoBaro/R-Type/forks","keys_url":"https://api.github.com/repos/HippoBaro/R-Type/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HippoBaro/R-Type/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HippoBaro/R-Type/teams","hooks_url":"https://api.github.com/repos/HippoBaro/R-Type/hooks","issue_events_url":"https://api.github.com/repos/HippoBaro/R-Type/issues/events{/number}","events_url":"https://api.github.com/repos/HippoBaro/R-Type/events","assignees_url":"https://api.github.com/repos/HippoBaro/R-Type/assignees{/user}","branches_url":"https://api.github.com/repos/HippoBaro/R-Type/branches{/branch}","tags_url":"https://api.github.com/repos/HippoBaro/R-Type/tags","blobs_url":"https://api.github.com/repos/HippoBaro/R-Type/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HippoBaro/R-Type/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HippoBaro/R-Type/git/refs{/sha}","trees_url":"https://api.github.com/repos/HippoBaro/R-Type/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HippoBaro/R-Type/statuses/{sha}","languages_url":"https://api.github.com/repos/HippoBaro/R-Type/languages","stargazers_url":"https://api.github.com/repos/HippoBaro/R-Type/stargazers","contributors_url":"https://api.github.com/repos/HippoBaro/R-Type/contributors","subscribers_url":"https://api.github.com/repos/HippoBaro/R-Type/subscribers","subscription_url":"https://api.github.com/repos/HippoBaro/R-Type/subscription","commits_url":"https://api.github.com/repos/HippoBaro/R-Type/commits{/sha}","git_commits_url":"https://api.github.com/repos/HippoBaro/R-Type/git/commits{/sha}","comments_url":"https://api.github.com/repos/HippoBaro/R-Type/comments{/number}","issue_comment_url":"https://api.github.com/repos/HippoBaro/R-Type/issues/comments{/number}","contents_url":"https://api.github.com/repos/HippoBaro/R-Type/contents/{+path}","compare_url":"https://api.github.com/repos/HippoBaro/R-Type/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HippoBaro/R-Type/merges","archive_url":"https://api.github.com/repos/HippoBaro/R-Type/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HippoBaro/R-Type/downloads","issues_url":"https://api.github.com/repos/HippoBaro/R-Type/issues{/number}","pulls_url":"https://api.github.com/repos/HippoBaro/R-Type/pulls{/number}","milestones_url":"https://api.github.com/repos/HippoBaro/R-Type/milestones{/number}","notifications_url":"https://api.github.com/repos/HippoBaro/R-Type/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HippoBaro/R-Type/labels{/name}","releases_url":"https://api.github.com/repos/HippoBaro/R-Type/releases{/id}","deployments_url":"https://api.github.com/repos/HippoBaro/R-Type/deployments","created_at":"2016-11-19T23:44:22Z","updated_at":"2016-12-02T10:43:11Z","pushed_at":"2016-12-27T15:03:25Z","git_url":"git://github.com/HippoBaro/R-Type.git","ssh_url":"git@github.com:HippoBaro/R-Type.git","clone_url":"https://github.com/HippoBaro/R-Type.git","svn_url":"https://github.com/HippoBaro/R-Type","homepage":null,"size":31567,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":3,"default_branch":"development"}},"base":{"label":"HippoBaro:development","ref":"development","sha":"59dff44225cc41308fa6c1e859938f1bc02f8cac","user":{"login":"HippoBaro","id":6069928,"avatar_url":"https://avatars.githubusercontent.com/u/6069928?v=3","gravatar_id":"","url":"https://api.github.com/users/HippoBaro","html_url":"https://github.com/HippoBaro","followers_url":"https://api.github.com/users/HippoBaro/followers","following_url":"https://api.github.com/users/HippoBaro/following{/other_user}","gists_url":"https://api.github.com/users/HippoBaro/gists{/gist_id}","starred_url":"https://api.github.com/users/HippoBaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HippoBaro/subscriptions","organizations_url":"https://api.github.com/users/HippoBaro/orgs","repos_url":"https://api.github.com/users/HippoBaro/repos","events_url":"https://api.github.com/users/HippoBaro/events{/privacy}","received_events_url":"https://api.github.com/users/HippoBaro/received_events","type":"User","site_admin":false},"repo":{"id":74242392,"name":"R-Type","full_name":"HippoBaro/R-Type","owner":{"login":"HippoBaro","id":6069928,"avatar_url":"https://avatars.githubusercontent.com/u/6069928?v=3","gravatar_id":"","url":"https://api.github.com/users/HippoBaro","html_url":"https://github.com/HippoBaro","followers_url":"https://api.github.com/users/HippoBaro/followers","following_url":"https://api.github.com/users/HippoBaro/following{/other_user}","gists_url":"https://api.github.com/users/HippoBaro/gists{/gist_id}","starred_url":"https://api.github.com/users/HippoBaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HippoBaro/subscriptions","organizations_url":"https://api.github.com/users/HippoBaro/orgs","repos_url":"https://api.github.com/users/HippoBaro/repos","events_url":"https://api.github.com/users/HippoBaro/events{/privacy}","received_events_url":"https://api.github.com/users/HippoBaro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HippoBaro/R-Type","description":"Epitech project","fork":false,"url":"https://api.github.com/repos/HippoBaro/R-Type","forks_url":"https://api.github.com/repos/HippoBaro/R-Type/forks","keys_url":"https://api.github.com/repos/HippoBaro/R-Type/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HippoBaro/R-Type/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HippoBaro/R-Type/teams","hooks_url":"https://api.github.com/repos/HippoBaro/R-Type/hooks","issue_events_url":"https://api.github.com/repos/HippoBaro/R-Type/issues/events{/number}","events_url":"https://api.github.com/repos/HippoBaro/R-Type/events","assignees_url":"https://api.github.com/repos/HippoBaro/R-Type/assignees{/user}","branches_url":"https://api.github.com/repos/HippoBaro/R-Type/branches{/branch}","tags_url":"https://api.github.com/repos/HippoBaro/R-Type/tags","blobs_url":"https://api.github.com/repos/HippoBaro/R-Type/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HippoBaro/R-Type/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HippoBaro/R-Type/git/refs{/sha}","trees_url":"https://api.github.com/repos/HippoBaro/R-Type/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HippoBaro/R-Type/statuses/{sha}","languages_url":"https://api.github.com/repos/HippoBaro/R-Type/languages","stargazers_url":"https://api.github.com/repos/HippoBaro/R-Type/stargazers","contributors_url":"https://api.github.com/repos/HippoBaro/R-Type/contributors","subscribers_url":"https://api.github.com/repos/HippoBaro/R-Type/subscribers","subscription_url":"https://api.github.com/repos/HippoBaro/R-Type/subscription","commits_url":"https://api.github.com/repos/HippoBaro/R-Type/commits{/sha}","git_commits_url":"https://api.github.com/repos/HippoBaro/R-Type/git/commits{/sha}","comments_url":"https://api.github.com/repos/HippoBaro/R-Type/comments{/number}","issue_comment_url":"https://api.github.com/repos/HippoBaro/R-Type/issues/comments{/number}","contents_url":"https://api.github.com/repos/HippoBaro/R-Type/contents/{+path}","compare_url":"https://api.github.com/repos/HippoBaro/R-Type/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HippoBaro/R-Type/merges","archive_url":"https://api.github.com/repos/HippoBaro/R-Type/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HippoBaro/R-Type/downloads","issues_url":"https://api.github.com/repos/HippoBaro/R-Type/issues{/number}","pulls_url":"https://api.github.com/repos/HippoBaro/R-Type/pulls{/number}","milestones_url":"https://api.github.com/repos/HippoBaro/R-Type/milestones{/number}","notifications_url":"https://api.github.com/repos/HippoBaro/R-Type/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HippoBaro/R-Type/labels{/name}","releases_url":"https://api.github.com/repos/HippoBaro/R-Type/releases{/id}","deployments_url":"https://api.github.com/repos/HippoBaro/R-Type/deployments","created_at":"2016-11-19T23:44:22Z","updated_at":"2016-12-02T10:43:11Z","pushed_at":"2016-12-27T15:03:25Z","git_url":"git://github.com/HippoBaro/R-Type.git","ssh_url":"git@github.com:HippoBaro/R-Type.git","clone_url":"https://github.com/HippoBaro/R-Type.git","svn_url":"https://github.com/HippoBaro/R-Type","homepage":null,"size":31567,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":3,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/HippoBaro/R-Type/pulls/93"},"html":{"href":"https://github.com/HippoBaro/R-Type/pull/93"},"issue":{"href":"https://api.github.com/repos/HippoBaro/R-Type/issues/93"},"comments":{"href":"https://api.github.com/repos/HippoBaro/R-Type/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/HippoBaro/R-Type/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/HippoBaro/R-Type/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HippoBaro/R-Type/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/HippoBaro/R-Type/statuses/271acc89f896228c1619a8f8b943db704ccb79cd"}}}}
{"actor":{"display_login":"HippoBaro"}}