public override void DoIt()
 {
     if ((startRound + 80 <= Global.Round))
     {
         startRound = Global.Round;
         SunEntity sun = new SunEntity((int)AssociatedGameObject.posX + 10, (int)AssociatedGameObject.posY + 40, (int)AssociatedGameObject.posY);
         Global.Entities.Add(sun);
     }
 }
 public override void DoIt()
 {
     if (Global.Round % 80 == 0)
     {
         SunEntity sun = new SunEntity(Global.Random(300, 900), Coord.GetYBordHautEcran(), Global.Random(200, 500));
         Global.Entities.Add(sun);
     }
     if (Global.Round % 120 == 0)
     {
         ZombieEntity ze = new ZombieEntity(Global.Random(0, 4), ZombieEntity.RandomZombie());
         Global.Entities.Add(ze);
     }
 }
Example #3
0
        public override void DoIt()
        {
            SunEntity sunEntity = AssociatedGameObject as SunEntity;

            if (AssociatedGameObject.posY <= sunEntity.EndingY)
            {
                AssociatedGameObject.GetComponent <CMoveable>().Stop();
            }
            if (AssociatedGameObject.GetComponent <CClickable>().IsClicked)
            {
                AssociatedGameObject.Inactive = true;
                Global.dollar += 50;
            }
        }
Example #4
0
 public static IObservable <StateChange <SunEntity, EntityState <SunAttributes> > > StateAllChangesWithCurrent(this SunEntity entity)
 {
     return(entity.StateAllChangesWithCurrent <SunEntity, EntityState <SunAttributes>, SunAttributes>());
 }