-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActor.cs
42 lines (34 loc) · 971 Bytes
/
Actor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SQLite;
namespace DreamQEngine
{
public class Actor
{
//This character's name
protected string mName;
public Actor(string name)
{
mName = name;
}
public Actor(int actorRef, SQLiteConnection conn)
{
SQLiteDataReader reader = new SQLiteCommand("Select * From Actors WHERE id = " + actorRef + ";", conn).ExecuteReader();
DataTable actorTable = new DataTable();
actorTable.Load(reader);
DataView actorView = new DataView(actorTable);
if (actorView.Count > 0)
{
mName = actorView[0]["name"].ToString();
}
}
//Getters and setters for character name
public string name
{
set { mName = value; }
get { return mName; }
}
}
}