2013-02-22 16:02:53 +08:00
|
|
|
This sample shows how to use AssetsManager to auto-update application resources(pictures or scripts).
|
|
|
|
|
|
|
|
In this sample, there is a scene which contains three items:
|
|
|
|
* enter
|
2013-02-22 17:26:21 +08:00
|
|
|
|
|
|
|
Start to run script.
|
2013-02-22 16:02:53 +08:00
|
|
|
* reset
|
2013-02-22 17:26:21 +08:00
|
|
|
|
|
|
|
Delete downloaded resources and delete recorded version code.
|
2013-02-22 16:02:53 +08:00
|
|
|
* update
|
2013-02-22 17:26:21 +08:00
|
|
|
|
|
|
|
Download new version of package if it exits.
|
2013-02-22 16:02:53 +08:00
|
|
|
|
|
|
|
You can use this sample like this:
|
|
|
|
* Run original version application(refered as v1)
|
2013-02-22 17:26:21 +08:00
|
|
|
|
2013-02-22 16:02:53 +08:00
|
|
|
```
|
|
|
|
start application
|
|
|
|
click "enter"
|
|
|
|
```
|
|
|
|
* Run new version application(v2)
|
2013-02-22 17:26:21 +08:00
|
|
|
|
2013-02-22 16:02:53 +08:00
|
|
|
```
|
|
|
|
start application
|
|
|
|
click "update"
|
|
|
|
click "enter"
|
|
|
|
```
|
|
|
|
You will find the changes.
|
|
|
|
* Run v1 again after running v2
|
2013-02-22 17:26:21 +08:00
|
|
|
|
2013-02-22 16:02:53 +08:00
|
|
|
```
|
|
|
|
start application
|
|
|
|
click "reset"
|
|
|
|
click "enter"
|
|
|
|
```
|
|
|
|
The application turns back to v1. Ofcourse you can run v2 again as mentioned abave.
|
2013-02-22 17:26:21 +08:00
|
|
|
|