Esempio n. 1
0
        public virtual void Attack()
        {
            // FLYSPAWN LOOP
            SpawnTimer.UpdateTimer();
            // Every X seconds, spawn some enemies.
            if (SpawnTimer.Test())
            {
                // Spawn 3 flies
                for (int i = 0; i < 3; i++)
                {
                    Level.CurrentRoom.Add(new Fly(new Vector2(Position.X - 25 + (25 * i), Position.Y)));
                }
                // Restart the thing.
                SpawnTimer.ResetToZero();
            }

            // ATTACK LOOP
            AttackTimer.UpdateTimer();
            // Every X seconds, attack the player
            if (AttackTimer.Test())
            {
                // Spawn 3 projectiles
                for (int i = 0; i < 3; i++)
                {
                    Globals.sounds.PlaySoundEffectOnce("EnemyAttack");
                    Level.CurrentRoom.Add(new EnemyAttack(Globals.Vector2ToDegrees(Level.Player.Position - Position) - 25 + (i * 25), Position));
                }
                // Restart the thing.
                AttackTimer.ResetToZero();
            }
        }
Esempio n. 2
0
 public UnholyBone()
     : base(0xF7E)
 {
     Movable = false;
     m_Timer = new SpawnTimer(this);
     m_Timer.Start();
 }
Esempio n. 3
0
 public void loadMugWorld()
 {
     SceneManager.LoadScene("MugWorld");
     SpawnTimer.setSpawnTimer(2.0f);
     ScoreTracker.setScore(0);
     Pause.setPause(false);
 }
Esempio n. 4
0
    void SpawnBeefy()
    {
        if (Pause.getPaused() == false && SpawnTimer.getSpawnTimer() < 1.80)
        {
            float rightScreenBound = 5;                    // set value for this
            float leftScreenBound  = -5;                   // set value for this
            float randomY          = Random.Range(-10f, 0f);
            float randomSide       = Random.Range(0f, 3f);

            if (randomSide < 1)
            {
                Instantiate(beefySpawnee, new Vector3(rightScreenBound, randomY, 0), Quaternion.identity);
            }
            else if (randomSide >= 1 && randomSide < 2)
            {
                Instantiate(beefySpawnee, new Vector3(leftScreenBound, randomY, 0), Quaternion.identity);
            }
            else if (randomSide >= 2)
            {
                //they come from the bottom
                float randomX = Random.Range(-10f, 10f);
                Instantiate(beefySpawnee, new Vector3(randomX, -7, 0), Quaternion.identity);
            }
        }
    }
        public HarpyEggSack() : base(0x10D9)
        {
            Movable = false;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 6
0
        private void Gameover()
        {
            vreme.Stop();
            SpawnTimer.Stop();
            MoveTimer.Stop();
            ReduceSpeed.Stop();
            GameOver     go  = new GameOver(lbScore.Text);
            DialogResult res = go.ShowDialog();

            if (res == System.Windows.Forms.DialogResult.Retry)
            {
                veg.Clear();
                score        = 0;
                lbTime.Text  = "60";
                lbScore.Text = "0";
                vreme.Start();
                SpawnTimer.Start();
                MoveTimer.Start();
                pb1.Visible = true;
                pb2.Visible = true;
                pb3.Visible = true;
                canvas.Invalidate();
                SpawnTimer.Interval = 10;
                progress.Value      = 60;
                isPressed           = false;
                ReduceSpeed.Start();
            }
        }
Esempio n. 7
0
    void determineSpawnTimer()
    {
        float hi = SpawnTimer.getSpawnTimer() - 0.03f;

        SpawnTimer.setSpawnTimer(hi);
        Debug.Log(SpawnTimer.getSpawnTimer());
    }
		public RecluseSpiderEggSac() : base( 4313 )
		{
			Movable = false;


			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 9
0
        public HarpyEggSack()
            : base(0x10D9)
        {
            Movable = false;

            m_Timer = new SpawnTimer( this );
            m_Timer.Start();
        }
Esempio n. 10
0
		public BloodwebSilk() : base( 0xF8D )
		{
			Movable = false;
			Hue = 2949;

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 11
0
        public RecluseSpiderEggSac() : base(4313)
        {
            Movable = false;


            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 12
0
 IEnumerator BeefySpawner()
 {
     while (true)
     {
         SpawnBeefy();
         yield return(new WaitForSeconds(SpawnTimer.getSpawnTimer() + 2));
     }
 }
Esempio n. 13
0
 IEnumerator SpeedySpawner()
 {
     while (true)
     {
         SpawnSpeedy();
         yield return(new WaitForSeconds(SpawnTimer.getSpawnTimer() + 5));
     }
 }
Esempio n. 14
0
 private void StopSpawnTimer()
 {
     if (m_SpawnTimer != null)
     {
         m_SpawnTimer.Stop();
         m_SpawnTimer = null;
     }
 }
Esempio n. 15
0
        public BloodwebSilk() : base(0xF8D)
        {
            Movable = false;
            Hue     = 2949;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
		public DaemonGate() : base( 8148 )
		{
			Movable = false;
			Name = "Portal to the Abyss";

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 17
0
		public DKMist() : base( 0x3789 )
		{
			Movable = false;
			Hue = 0x3F;

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 18
0
        public DaemonGate() : base(8148)
        {
            Movable = false;
            Name    = "Portal to the Abyss";

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 19
0
 private void StopSpawnTimer()
 {
     if (this.m_SpawnTimer != null)
     {
         this.m_SpawnTimer.Stop();
         this.m_SpawnTimer = null;
     }
 }
Esempio n. 20
0
 private void WorkStart()
 {
     this.Text = "Csv Summator - Working";
     timersManuallyActivated = false;
     isDirectoryFinished     = false;
     SpawnTimer.Start();
     UpdateStatus("ROZPOCZYNAM PRACĘ PROGRAMU", Color.Yellow);
 }
Esempio n. 21
0
		public UnholyBone() : base( 0xF7E )
		{
			Movable = false;
			Hue = 0x497;

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 22
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            _ = reader.ReadInt();

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 23
0
 private void StopTimers()
 {
     SumWriter.Stop();
     CategoryWriter.Stop();
     YearlyWriter.Stop();
     NotifyTimer.Stop();
     SpawnTimer.Stop();
 }
Esempio n. 24
0
		private void StartSpawnTimer( TimeSpan delay )
		{
			StopSpawnTimer();

			m_SpawnTimer = new SpawnTimer( this, delay );
			m_SpawnTimer.Start();

			m_NextSpawnTime = DateTime.UtcNow + delay;
		}
		public ElementalStone() : base( 0x2809 )
		{
			Movable = false;
			Hue = 0x4F2;
			Name = "Elemental Summoning Stone";

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 26
0
        public CursedRumBottles() : base(0x99D)
        {
            Movable = false;
            Hue     = 0x483;
            Name    = "Cursed bottles of rum";

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
        public PlaguedSkull()
            : base(Utility.Random( 0x1AE0, 5 ))
        {
            Movable = false;
            Hue = 0x55C;

            m_Timer = new SpawnTimer( this );
            m_Timer.Start();
        }
Esempio n. 28
0
        public InsaneDagger() : base(0xF52)
        {
            Movable = false;
            Name    = "Insane Dagger";
            Hue     = 1153;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 29
0
        public RSQEggSac()
            : base(4316)
        {
            Movable = false;
            Hue     = 350;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 30
0
        private void StartSpawnTimer(TimeSpan delay)
        {
            StopSpawnTimer();

            m_SpawnTimer = new SpawnTimer(this, delay);
            m_SpawnTimer.Start();

            m_NextSpawnTime = DateTime.Now + delay;
        }
		public EarthcallerGate() : base( 8148 )
		{
			Movable = false;
			Name = "Gate of Earthcalling";
			Hue = 2311;

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 32
0
        public UnholyBone() : base(0xF7E)
        {
            Movable = false;
            Hue     = 0x497;
            Name    = "unholy bone";

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
		public WindcallerGate() : base( 8148 )
		{
			Movable = false;
			Name = "Gate of Windcalling";
			Hue = 1237;

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 34
0
		public InsaneDagger() : base( 0xF52 )
		{
			Movable = false;
			Name = "Insane Dagger";
			Hue = 1153;

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 35
0
        public EarthcallerGate() : base(8148)
        {
            Movable = false;
            Name    = "Gate of Earthcalling";
            Hue     = 2311;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
        public WindcallerGate() : base(8148)
        {
            Movable = false;
            Name    = "Gate of Windcalling";
            Hue     = 1237;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
        public ElementalStone() : base(0x2809)
        {
            Movable = false;
            Hue     = 0x4F2;
            Name    = "Elemental Summoning Stone";

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 38
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
		}
Esempio n. 39
0
 void SpawnSpeedy()
 {
     if (Pause.getPaused() == false && SpawnTimer.getSpawnTimer() < 1.90)
     {
         //they come from the bottom
         float randomX = Random.Range(-5f, 5f);
         Instantiate(speedySpawnee, new Vector3(randomX, -7, 0), Quaternion.identity);
     }
 }
Esempio n. 40
0
        public UnholyBone()
            : base(0xF7E)
        {
            this.Movable = false;
            this.Hue     = 0x497;

            this.m_Timer = new SpawnTimer(this);
            this.m_Timer.Start();
        }
Esempio n. 41
0
		public DKRemains() : base( 3790 )
		{
			Movable = false;

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();

			Effects.PlaySound( GetWorldLocation(), Map, 0x1FB );
			Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3789, 10, 10, 0, 0 );
		}
Esempio n. 42
0
        public DKRemains() : base(3790)
        {
            Movable = false;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();

            Effects.PlaySound(GetWorldLocation(), Map, 0x1FB);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3789, 10, 10, 0, 0);
        }
Esempio n. 43
0
        public SandMine() : base(0x11EA)
        {
            Movable = false;
            Name    = "sand mine";

            Hue = 0;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 44
0
        public SandMine() : base(0x11EA)
        {
            Movable = false;
            Name = "sand mine";

            Hue = 0;

            m_Timer = new SpawnTimer(this);
            m_Timer.Start();
        }
Esempio n. 45
0
		public EarthGate( EarthSummoner summoner ) : base( 8148 )
		{
			Movable = false;
			Name = "Earth Gate";
			Hue = 2311;

			m_Timer = new SpawnTimer( this );
			m_Timer.Start();

			m_Summoner = summoner;
		}
Esempio n. 46
0
		public WebCase() //: base( 4314 )
		{
			Movable = false;
			Name = "a mass of webbing";

AddonComponent ac = null;
			ac = new AddonComponent( 4284 );
			AddComponent( ac, -1, 3, 0 );
			ac = new AddonComponent( 4313 );
			AddComponent( ac, -1, 0, 0 );
			ac = new AddonComponent( 4313 );
			AddComponent( ac, -1, -2, 0 );
			ac = new AddonComponent( 4313 );
			AddComponent( ac, -2, 0, 0 );
			ac = new AddonComponent( 4282 );
			AddComponent( ac, 1, 1, 0 );
			ac = new AddonComponent( 4281 );
			AddComponent( ac, 2, 0, 0 );
			ac = new AddonComponent( 4283 );
			AddComponent( ac, 0, 2, 0 );
			ac = new AddonComponent( 4280 );
			AddComponent( ac, 3, -1, 0 );
			ac = new AddonComponent( 4314 );
			AddComponent( ac, 1, 0, 0 );
			ac = new AddonComponent( 4317 );
			AddComponent( ac, 2, 2, 51 );
			ac = new AddonComponent( 4313 );
			AddComponent( ac, 0, 1, 30 );
			ac = new AddonComponent( 4314 );
			AddComponent( ac, 2, 2, 50 );


		
			m_Timer = new SpawnTimer( this );
			m_Timer.Start();
			
		}
Esempio n. 47
0
		public void Start()
		{
			m_timer = new SpawnTimer(m_Town, this, m_Delay);
			m_timer.Start();
			m_Running = true;
		}
Esempio n. 48
0
 private void StopSpawnTimer()
 {
     if ( m_SpawnTimer != null )
     {
         m_SpawnTimer.Stop();
         m_SpawnTimer = null;
     }
 }
Esempio n. 49
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			m_Delay = reader.ReadTimeSpan();
			m_Town = (TownStone)reader.ReadItem();
			m_SpawnedGuard = (PomiGuard)reader.ReadMobile();
			m_RangeHome = reader.ReadInt();
			m_Running = reader.ReadBool();
			if(m_Running)
			{
				m_timer =  new SpawnTimer(m_Town, this, m_Delay);
				m_timer.Start();
			}
			
		}
Esempio n. 50
0
 private void StopSpawnTimer()
 {
     if (this.m_SpawnTimer != null)
     {
         this.m_SpawnTimer.Stop();
         this.m_SpawnTimer = null;
     }
 }