我有一个包含宝石列表的Gemfile,即:
private void MoveToCollectable()
{
Collectable collectable = collectablesToCollect.First();
StartCoroutine(CollectionMovement(collectable)); // collect it
}
private IEnumerator CollectionMovement(Collectable collectable)
{
if (isCollecting)
yield break; // Already in use? return
isCollecting = true;
yield return StartCoroutine(MoveToPoint(collectable.GetCollectablePosition())); // Move to it
if (collectable != null)
collectable.StartMovingToPlayer(); // make it move to the player
yield return StartCoroutine(MoveToPoint(currentPosition)); // move back
collectablesToCollect.Remove(collectable); // remove it from the list
if (CollectablesInRange()) // any other collectables in range?
MoveToCollectable(); // do it again
isCollecting = false;
}
private IEnumerator MoveToPoint(Vector3 targetPosition) // move to a point
{
while (transform.position != targetPosition)
{
transform.position = Vector3.MoveTowards(transform.position, targetPosition, movementSpeed * Time.deltaTime);
yield return null;
}
}
反正有没有我手动查找所有这些Gems的Github回购网址列表?也许使用捆绑包?
IE,我希望得到这个:
gem 'celluloid'
gem 'typhoeus'
答案 0 :(得分:2)
一个gem可能不会拥有一个公共github repo ...它可能是一个私人仓库,或者存储在不同的主机上,甚至根本不在线。因此,无法保证您能够将每个gem映射到github仓库。
但是,您可以尝试解决一些问题,例如:
gem spec -r <name>
)或远程(ActionCable
)。Octokit
。rails
存储库中的> gem install gemdiff
> gemdiff find celluloid
> https://github.com/celluloid/celluloid
> gemdiff find typhoeus
> https://github.com/typhoeus/typhoeus
> gemdiff find notarealgem12321
> ERROR: No gem matching 'notarealgem12321 (>= 0)' found
> Could not find github repository for notarealgem12321
。这显然是一项非常重要的任务......但幸运的是,这个库已经处理了很多艰苦的工作:
https://github.com/teeparham/gemdiff
用法:
android:scrollbarStyle="outsideOverlay"