オプション設定、達成度、レベルの情報、スコアなど、様々な目的でデータを保存するために、ほとんど全てのゲームでデータストアが必要です。 Android libraryで、既定では二つの方法が使用できます。
Data Storage:
Mostly every kind of game needs it, storing data, for various purposes, storing options configuration, achievements, information about levels, scores and so on. Android library, |
設定へのアクセス、変更をするためのシンプルなインタフェース。 Devoted rather for parts of data. これの使用方法を説明する必要はないでしょう - ここ(Androidの公式情報)で十分説明されていますから。使い方に違いはありません。これを使用したい場合、AndEngine 開発者であれば特に説明は不要でしょう。
1. Shared Preferences.Simple Interface for accessing and modifying preferences. Devoted rather for parts of data. Useless to explain how to use it - since its well explained here (official Android infos) There are no differences in usage, no matter when you want to use it, there is no need for special description for AndEngine developers. |
プライベートデータベースに構造化したデータを保存します。レベル、スコア、達成度、似たようなデータの情報を保存するのに特に便利です。 これも十分に説明されています - ここ.
テーブルといくつかの内部フィールドを搭載したデータベースのサンプルを作成するコードサンプルが必要な場合は、RealMayo氏が公開しているコードを参考にできます - ここ。 彼はコードに丁寧なコメントをつけているので、コードがどのように動作するか問題なく理解できるでしょう。
2. SQLite Databases.Store structured data in a private database. Especially useful for storing info about levels, scores, achievements and similar data. Its also well explain - here. If you need code example, how to create example database with table and few fields inside, you may follow code shared by RealMayo - HERE. He provide well commented code, so you shouldn't have any problems with understanding how does it work. |
注意事項
|