Skip to content

Commit

Permalink
update RM
Browse files Browse the repository at this point in the history
  • Loading branch information
lfkdsk committed Mar 19, 2016
1 parent d84f95b commit 9f5892f
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ An easy open source Android Native Game FrameWork.

```

## Engine in V1.03
## Engine in V1.04

A plane game Demo:[Demo地址](https://github.com/lfkdsk/EngineDemo)
Extra modules:[JustWeTools](https://github.com/lfkdsk/JustWeTools)
Expand Down
87 changes: 86 additions & 1 deletion eng_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ An easy open source Android Native Game FrameWork.

```

## Engine come to V1.03
## Engine come to V1.04

PlaneGame Demo:[Demo](https://github.com/lfkdsk/EngineDemo)
OtherTools:[JustWeTools](https://github.com/lfkdsk/JustWeTools)
Expand Down Expand Up @@ -92,6 +92,9 @@ Web Demo:[JustWe-WebServer](https://github.com/lfkdsk/JustWe-WebServer)
* [10.1Open/Close Server](#101openclose-server)
* [10.2Scan Devices](#102scan-devices)
* [10.3Send Message](#103send-message)
* [11.SQLite DataBase](#11SQLite-DataBase)
* [11.1Create Table](#111Create-Table)
* [11.2ADD,DELETE,FIND,UPDATE](#112ADD,DELETE,FIND,UPDATE)

## Extend Method
* [Draw by yourselves](#draw-by-yourselves)
Expand Down Expand Up @@ -657,6 +660,88 @@ Use `blueToothServer.getPairedDevices (); return a list of paired devices.
In the match after the success can be used `blueToothServer.sendMessage (String MSG);` Send Message.
At the same time, the message received from the getMessage (Interface) can also be obtained.

### 11.SQLite DataBase

SQLite use IOC FrameWork。

#### 11.1Create Table

Create Table should new a Class extend Node。

``` java

// Table name
@TableName(tableName = "lfkdsk")
public class User extends Node {

// INTEGER
@LabelName(autoincrement = true,
type = LabelName.Type.INTEGER,
columnName = "name",
generatedId = true)
private int name;

// TEXT user_name
@LabelName(type = LabelName.Type.TEXT,
columnName = "user_name")
private String user_name;

public User(String user_name) {
super(user_name);
this.user_name = user_name;
}

public User(int name, String user_name) {
super(name, user_name);
this.name = name;
this.user_name = user_name;
}

public int getName() {
return name;
}

public void setName(int name) {
this.name = name;
}

public String getUser_name() {
return user_name;
}

public void setUser_name(String user_name) {
this.user_name = user_name;
}
}

```


``` java

// new a database with this class and name
private DataBase dataBase = DataBase.initAndOpen("user", User.class);


```

#### 11.2ADD,DELETE,FIND,UPDATE

``` java

// add
database.insert(User user);
// find
database.get(int position);
// delete
database.delete(int position);
// update
database.update(User user);
...

```



### Draw by yourselves
Can accept the user's drawing input, and to generate the wizard, background, or other objects:[How To Use?](https://github.com/lfkdsk/JustWeTools#paintview画图工具)
Expand Down
87 changes: 85 additions & 2 deletions info.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ An easy open source Android Native Game FrameWork.

```

## 引擎进入V1.03版本
## 引擎进入V1.04版本

以之开发的微信打飞机游戏Demo:[Demo地址](https://github.com/lfkdsk/EngineDemo)
很多额外控件:[JustWeTools](https://github.com/lfkdsk/JustWeTools)
Expand Down Expand Up @@ -92,7 +92,9 @@ An easy open source Android Native Game FrameWork.
* [10.1开启、关闭服务](#101开启关闭服务)
* [10.2扫描设备](#102扫描设备)
* [10.3发送消息](#103发送消息)

* [11.SQLite数据库](#11SQLite数据库)
* [11.1创建表](#111创建表)
* [11.2增删查改](#112增删查改)
## 拓展功能
* [允许玩家绘制](#允许玩家绘制)
* [流程脚本](#流程脚本)
Expand Down Expand Up @@ -644,6 +646,87 @@ getDevice()方法接收。
在配对成功之后就可以使用`blueToothServer.sendMessage(String msg);`发送消息了。
同时,消息的接收也可以从getMessage()接口中获得。

### 11.SQLite数据库

SQLite使用了IOC框架。

#### 11.1创建表

新建的创建表需要继承Node并且写出注解类。

``` java

// 表名
@TableName(tableName = "lfkdsk")
public class User extends Node {

// 主键自增 INTEGER型
@LabelName(autoincrement = true,
type = LabelName.Type.INTEGER,
columnName = "name",
generatedId = true)
private int name;

// TEXT型 栏名为user_name
@LabelName(type = LabelName.Type.TEXT,
columnName = "user_name")
private String user_name;

// 自增主键所以只需要提供其他信息
public User(String user_name) {
super(user_name);
this.user_name = user_name;
}

public User(int name, String user_name) {
super(name, user_name);
this.name = name;
this.user_name = user_name;
}

public int getName() {
return name;
}

public void setName(int name) {
this.name = name;
}

public String getUser_name() {
return user_name;
}

public void setUser_name(String user_name) {
this.user_name = user_name;
}
}

```


``` java

// 通过这种方式获取数据库 表名
private DataBase dataBase = DataBase.initAndOpen("user", User.class);


```

#### 11.2增删查改

``` java

// add
database.insert(User user);
// find
database.get(int position);
// delete
database.delete(int position);
// update
database.update(User user);
...

```

## 扩展功能

Expand Down

0 comments on commit 9f5892f

Please sign in to comment.