2次元においてオブジェクトが衝突している(重なりがある)かの判定方法
例
- 敵機と弾の当たり判定
- 自キャラクターと障害物の衝突判定
|
1 |
Result of call to 'xxx' is unused |
使用しない(無視する)関数の戻り値はワイルドカード(_)に明示的に代入する。
|
1 |
_ = fooFunc(3) |
iOS 8以降に搭載されたQuickType(予測変換)
続きを読む
PowerPointのタイトル(文字列)が全て大文字で表される。
文字枠(プレースホルダー)のフォント設定で「全て大文字」が有効になっている。

Sierra (macOS 10.12) でhomebrewがバージョンアップできない。
|
1 2 3 4 5 |
$ brew upgrade Warning: You are using OS X 10.12. We do not provide support for this pre-release version. You may encounter build failures or other breakages. Please create pull-requests instead of filing issues. |
引数の最後においたクロージャ式は特別な記法で記述できる。接尾クロージャ、後置クロージャ。
|
1 2 3 |
func someFunctionThatTakesAClosure(closure: () -> Void) { // function body goes here } |
|
1 2 3 |
someFunctionThatTakesAClosure(closure: { // closure's body goes here }) |
|
1 2 3 |
someFunctionThatTakesAClosure() { // trailing closure's body goes here } |
|
1 2 3 |
someFunctionThatTakesAClosure { // trailing closure's body goes here } |
|
1 2 3 4 5 |
To run dex in process, the Gradle daemon needs a larger heap. It currently has 1024 MB. For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB. To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties. For more information see https://docs.gradle.org/current/userguide/build_environment.html |
APKの作成中に下記のエラーで停止する。
|
1 2 |
Error:Execution failed for task ':transformResourcesWithMergeJavaResForDebug'. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE |
Gradleによるビルド中に下記のエラーで停止する。
|
1 2 3 4 |
Error:Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded Error:1 error; aborting Error:Execution failed for task ':transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException |
build.gradleに以下の記述を追加してJavaのヒープサイズを拡張する。
|
1 2 3 4 5 6 |
android { ... dexOptions { javaMaxHeapSize "4g" } } |
Macの修飾キー、特殊キーボードキーの文字コード。