{"action":"created","issue":{"url":"https://api.github.com/repos/Demigiant/dotween/issues/107","repository_url":"https://api.github.com/repos/Demigiant/dotween","labels_url":"https://api.github.com/repos/Demigiant/dotween/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/Demigiant/dotween/issues/107/comments","events_url":"https://api.github.com/repos/Demigiant/dotween/issues/107/events","html_url":"https://github.com/Demigiant/dotween/issues/107","id":195538597,"number":107,"title":"Obfuscated API design - Kill() and Tween reuse causing Tweens to not play","user":{"login":"thefuntastic","id":296286,"avatar_url":"https://avatars.githubusercontent.com/u/296286?v=3","gravatar_id":"","url":"https://api.github.com/users/thefuntastic","html_url":"https://github.com/thefuntastic","followers_url":"https://api.github.com/users/thefuntastic/followers","following_url":"https://api.github.com/users/thefuntastic/following{/other_user}","gists_url":"https://api.github.com/users/thefuntastic/gists{/gist_id}","starred_url":"https://api.github.com/users/thefuntastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefuntastic/subscriptions","organizations_url":"https://api.github.com/users/thefuntastic/orgs","repos_url":"https://api.github.com/users/thefuntastic/repos","events_url":"https://api.github.com/users/thefuntastic/events{/privacy}","received_events_url":"https://api.github.com/users/thefuntastic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-14T14:03:20Z","updated_at":"2016-12-14T14:18:22Z","closed_at":"2016-12-14T14:18:22Z","body":"There is a problem I routinely run into and can't seem to get my head around. It's a common pattern for me to want to stop a tween, particular if a routine needs to exit early. The only way I've found to stop a tween is Kill(), however this seems to limit your ability to cache and reuse the tween as resuming after a kill seems to not work? \r\n\r\n```\r\nvar tween = DOVirtual.DelayedCall(1f, OnComplete); //Create Tween instance, autoplays as per DoTween config\r\n\r\n//On early exit\r\ntween.Kill()  //Only way I've found to stop a tween\r\n\r\n//On next time enter routine\r\ntween.Restart() //Tween doesn't play or throw error\r\ntween.Play() //Tween doesn't play or throw error\r\n```\r\n\r\nIn this case the only solution I've found is to create a new tween instance every time, but that generates garbage. Is there something about the structure of the tween libs i haven't understood, or a way we could make the API more intuitive (ie other tween libs would have Stop() method and a Kill() method, where it's easy to understand Kill as causing the disposal side-effect that makes a tween invalid)."},"comment":{"url":"https://api.github.com/repos/Demigiant/dotween/issues/comments/267044660","html_url":"https://github.com/Demigiant/dotween/issues/107#issuecomment-267044660","issue_url":"https://api.github.com/repos/Demigiant/dotween/issues/107","id":267044660,"user":{"login":"Demigiant","id":8322877,"avatar_url":"https://avatars.githubusercontent.com/u/8322877?v=3","gravatar_id":"","url":"https://api.github.com/users/Demigiant","html_url":"https://github.com/Demigiant","followers_url":"https://api.github.com/users/Demigiant/followers","following_url":"https://api.github.com/users/Demigiant/following{/other_user}","gists_url":"https://api.github.com/users/Demigiant/gists{/gist_id}","starred_url":"https://api.github.com/users/Demigiant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demigiant/subscriptions","organizations_url":"https://api.github.com/users/Demigiant/orgs","repos_url":"https://api.github.com/users/Demigiant/repos","events_url":"https://api.github.com/users/Demigiant/events{/privacy}","received_events_url":"https://api.github.com/users/Demigiant/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T14:18:22Z","updated_at":"2016-12-14T14:18:22Z","body":"Hi,\r\n\r\nYou can Pause a tween (which works stops it but doesn't rewind it) or Rewind it (which stops and rewinds it).\r\n\r\nCheers,\r\nDaniele"}}
{"actor":{"display_login":"Demigiant"}}