Ejemplo n.º 1
0
 public override void Tick()
 {
     base.Tick();
     ReceiveableMan = null;
     if (Clock.IsDay())
     {
         foreach (Person t in Homeless)
         {
             if (Insider.Contains(t))
             {
                 if (t.Company)
                 {
                     t.GoJob();
                 }
                 else if (t.Work)
                 {
                     t.GoWork();
                 }
                 else if (!t.acting)
                 {
                     ReceiveableMan = t;
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 public override void Tick()
 {
     base.Tick();
     ReceiveableMan = null;
     if (Clock.IsDay())
     {
         foreach (Person t in Officers)
         {
             if (Insider.Contains(t) && t.Work)
             {
                 t.GoWork();
             }
             else
             {
                 ReceiveableMan = t;
             }
         }
     }
     else
     {
         foreach (Unit t in Officers)
         {
             if (Insider.Contains(t))
             {
                 t.GoHome();
             }
         }
     }
 }
Ejemplo n.º 3
0
 public override void Tick()
 {
     base.Tick();
     ReceiveableMan = null;
     if (Clock.IsDay())
     {
         foreach (Human t in Livers)
         {
             if (Insider.Contains(t) && !t.acting)
             {
                 ReceiveableMan = t;
             }
         }
         if (Working && !UnderConstruct && !UnderDeconstruct)
         {
             if (Workers.Count > 0)
             {
                 BirthStatus += BirthSpeed;
                 if (BirthStatus >= BirthCap)
                 {
                     BirthStatus = 0f;
                     Human t = Instantiate(personPrefab);
                     TriIsland.Instance.entities.AddUnit(t);
                     t.Location = Location;
                     t.Home     = this;
                     t.AddCommand(new GetInCommand(this));
                     while (Workers.Count > 0)
                     {
                         (Workers[0] as Human).Work = null;
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 4
0
 public override void Tick()
 {
     base.Tick();
     if (Clock.IsDay())
     {
         foreach (Human t in Homeless)
         {
             if (Insider.Contains(t) && !t.acting)
             {
                 ReceiveableMan = t;
             }
         }
     }
 }
Ejemplo n.º 5
0
 public override void Tick()
 {
     base.Tick();
     CommandReceiver = null;
     if (Clock.IsDay())
     {
         foreach (Person t in Livers)
         {
             if (Insider.Contains(t))
             {
                 if (t.Company)
                 {
                     t.GoJob();
                 }
                 else if (t.Work)
                 {
                     t.GoWork();
                 }
                 else
                 {
                     CommandReceiver = t;
                 }
             }
         }
         if (Working && !UnderConstruct)
         {
             if (Workers.Count > 0)
             {
                 BirthStatus += BirthSpeed;
                 if (BirthStatus >= BirthCap)
                 {
                     BirthStatus = 0f;
                     Person t = Instantiate(personPrefab);
                     TriIsleland.Instance.entities.AddUnit(t);
                     t.Location = Location;
                     t.Home     = this;
                     t.AddCommand(new GetInCommand(this));
                     while (Workers.Count > 0)
                     {
                         (Workers[0] as Person).Work = null;
                     }
                 }
             }
         }
     }
 }