Inheritance: System.EventArgs
Beispiel #1
0
 private void OnBang(object sender, BangEventArgs e)
 {
     if (e.IsDesiredCounter(_cInvulnerable))
     {
         _invulnerableAfterHit = false;
     }
 }
Beispiel #2
0
 private void OnBang(object sender, BangEventArgs e)
 {
     // Unlock owner direction after hit
     if (e.ID.Equals(_cSwingHit))
         _owner.FaceLock = false;
 }
Beispiel #3
0
 private void OnBang(object sender, BangEventArgs e)
 {
 }
Beispiel #4
0
 private void OnStep(object sender, BangEventArgs e)
 {
     if (e.IsDesiredCounter(_cUpdater))
     {
         if(_owner.BoundingRect.Intersects(_collider.BoundingRect))
             Owner.CM.StartCounter(_cUpdater, true, false);
     }
 }
Beispiel #5
0
 private void OnBang(object sender, BangEventArgs e)
 {
     if (e.IsDesiredCounter(_cUpdater))
     {
         _locked = false;
         _collider = null;
     }
 }
Beispiel #6
0
        private void OnBang(object sender, BangEventArgs e)
        {
            if (e.IsDesiredCounter(_cShutdown))
            {
                OnCooldown = false;

            }
        }
Beispiel #7
0
 private void OnBang(object sender, BangEventArgs e)
 {
     if (e.ID.Equals(_animCounter))
     {
         _frame = (_frame + 1) % 2;
     }
 }
Beispiel #8
0
 protected virtual void OnBang(object sender, BangEventArgs e)
 {
     if (e.ID.Equals(_animCounter2))
     {
         _frame2 = (_frame2 + 1) % 2;
     }
     if (e.ID.Equals(_animCounter3))
     {
         _frame3 = (_frame3 + 1) % 3;
     }
 }
Beispiel #9
0
 // Summary:
 //     Initializes a counter with a default term
 //
 // Parameters:
 //   _default:
 //     Default value that the counter gets resets to after bang
 //
 public Counter(int _default, string _id)
 {
     mDefault        = _default;
     mTerm           = mDefault;
     mElapsedTime    = 0;
     mActive         = false;
     mID             = _id;
     mBangTag        = new BangEventArgs(mID);
 }
Beispiel #10
0
 private void PassOnBang(object _sender, BangEventArgs _e)
 {
     if (Bang != null)
         Bang(null, _e);
 }
Beispiel #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Counter" /> class.
 /// </summary>
 /// <param name="defaultTerm">The default term.</param>
 /// <param name="id">The ID.</param>
 public Counter(string id, int defaultTerm, bool stepCalled)
 {
     _default        = defaultTerm;
     _term           = _default;
     _elapsedTime    = 0;
     _active         = false;
     _id             = id;
     _bangTag        = new BangEventArgs(_id);
     _stepCalling     = stepCalled;
 }
Beispiel #12
0
 private void PassOnStep(object sender, BangEventArgs e)
 {
     if (Step != null)
         Step(null, e);
 }
Beispiel #13
0
 private void OnBang(object sender, BangEventArgs e)
 {
     // Shooter is not on cooldown anymore
     if (e.ID.Equals(_cShooter))
         _cooldown = false;
 }