From 1b71e17d993c45d9d66444a9e5c89b26fd4e0c70 Mon Sep 17 00:00:00 2001 From: RosimInc Date: Fri, 14 Aug 2015 00:31:03 -0400 Subject: [PATCH] Merged and fixed the person constructor. Signed-off-by: RosimInc --- Assets/Scripts/Models/LevelGenerator.cs | 2 +- Assets/Scripts/Models/Person.cs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Models/LevelGenerator.cs b/Assets/Scripts/Models/LevelGenerator.cs index 170eb24..8b34e74 100644 --- a/Assets/Scripts/Models/LevelGenerator.cs +++ b/Assets/Scripts/Models/LevelGenerator.cs @@ -134,7 +134,7 @@ namespace DeathBook.Model //Vector2 times = //Person p = new Person(id, pos,); - Person p = new Person(id); + Person p = new Person(id, pos); p.initialPosition = pos; return p; diff --git a/Assets/Scripts/Models/Person.cs b/Assets/Scripts/Models/Person.cs index 6d37ef3..2097751 100644 --- a/Assets/Scripts/Models/Person.cs +++ b/Assets/Scripts/Models/Person.cs @@ -42,10 +42,15 @@ namespace DeathBook.Model get { return numFriends; } } - public Person(int id, float x, float y, float z) + public bool Connected + { + get { return connected; } + } + + public Person(int id, Vector3 pos) { this.id = id; - initialPosition = new Vector3(x, y, z); + initialPosition = pos; alive = true; // Temporary