public ChangeColliderLayerInXFrames(CollisionComponent xComponent, int iTimer, int ibitLayer, bool bSend = false)
 {
     this.xComponent = xComponent;
     this.iTimer = iTimer;
     this.ibitLayer = ibitLayer;
     this.bSend = bSend;
 }
		public ChangeColliderPropertyInXFrames(CollisionComponent xComponent, CollisionComponent.ColliderGroup enGroup, CollisionComponent.ColliderProperty enProperty, int iTimer)
		{
			this.xComponent = xComponent;
			this.enGroup = enGroup;
			this.enProperty = enProperty;
			this.iTimer = iTimer;
		}
Beispiel #3
0
 public void ActivateGroup(CollisionComponent.ColliderGroup enGroup)
 {
     if (enGroup == CollisionComponent.ColliderGroup.All || enGroup == CollisionComponent.ColliderGroup.Movement)
     {
         foreach (Collider col in this.lxMovementColliders)
         {
             col.bIsActive = true;
         }
     }
     if (enGroup == CollisionComponent.ColliderGroup.All || enGroup == CollisionComponent.ColliderGroup.Combat)
     {
         for (int i = 0; i < this.lxHitboxColliders.Count; i++)
         {
             this.lxHitboxColliders[i].bIsActive = true;
         }
         for (int j = 0; j < this.lxArmorboxColliders.Count; j++)
         {
             this.lxArmorboxColliders[j].bIsActive = true;
         }
     }
 }
Beispiel #4
0
 public void SetPropertyInGroup(CollisionComponent.ColliderGroup enGroup, CollisionComponent.ColliderProperty enProperty)
 {
     if (enGroup == CollisionComponent.ColliderGroup.All)
     {
         this.SetPropertyInGroup(CollisionComponent.ColliderGroup.Combat, enProperty);
         this.SetPropertyInGroup(CollisionComponent.ColliderGroup.Movement, enProperty);
         return;
     }
     if (enGroup == CollisionComponent.ColliderGroup.Movement)
     {
         if (enProperty == CollisionComponent.ColliderProperty.Flying)
         {
             using (List<Collider>.Enumerator enumerator = this.lxMovementColliders.GetEnumerator())
             {
                 while (enumerator.MoveNext())
                 {
                     Collider col = enumerator.Current;
                     col.bIsFlying = true;
                 }
                 return;
             }
         }
         if (enProperty == CollisionComponent.ColliderProperty.NonFlying)
         {
             using (List<Collider>.Enumerator enumerator2 = this.lxMovementColliders.GetEnumerator())
             {
                 while (enumerator2.MoveNext())
                 {
                     Collider col2 = enumerator2.Current;
                     col2.bIsFlying = false;
                 }
                 return;
             }
         }
         if (enProperty == CollisionComponent.ColliderProperty.Ghost)
         {
             using (List<Collider>.Enumerator enumerator3 = this.lxMovementColliders.GetEnumerator())
             {
                 while (enumerator3.MoveNext())
                 {
                     Collider col3 = enumerator3.Current;
                     Program.GetTheGame().xCollisionMaster.UnregisterMovementCollider(col3);
                     Program.GetTheGame().xCollisionMaster.RegisterGhostCollider(col3);
                 }
                 return;
             }
         }
         if (enProperty == CollisionComponent.ColliderProperty.NonGhost)
         {
             using (List<Collider>.Enumerator enumerator4 = this.lxMovementColliders.GetEnumerator())
             {
                 while (enumerator4.MoveNext())
                 {
                     Collider col4 = enumerator4.Current;
                     Program.GetTheGame().xCollisionMaster.UnregisterMovementCollider(col4);
                     Program.GetTheGame().xCollisionMaster.RegisterMovementCollider(col4);
                 }
                 return;
             }
         }
         if (enProperty == CollisionComponent.ColliderProperty.Active)
         {
             this.ActivateGroup(enGroup);
             return;
         }
         if (enProperty == CollisionComponent.ColliderProperty.Inactive)
         {
             this.DeactivateGroup(enGroup);
             return;
         }
     }
     else if (enGroup == CollisionComponent.ColliderGroup.Combat)
     {
         if (enProperty == CollisionComponent.ColliderProperty.Flying)
         {
             for (int i = 0; i < this.lxHitboxColliders.Count; i++)
             {
                 this.lxHitboxColliders[i].bIsFlying = true;
             }
             for (int j = 0; j < this.lxArmorboxColliders.Count; j++)
             {
                 this.lxArmorboxColliders[j].bIsFlying = true;
             }
             return;
         }
         if (enProperty == CollisionComponent.ColliderProperty.NonFlying)
         {
             for (int k = 0; k < this.lxHitboxColliders.Count; k++)
             {
                 this.lxHitboxColliders[k].bIsFlying = false;
             }
             for (int l = 0; l < this.lxArmorboxColliders.Count; l++)
             {
                 this.lxArmorboxColliders[l].bIsFlying = false;
             }
         }
     }
 }
Beispiel #5
0
 public bool IsGroupActive(CollisionComponent.ColliderGroup enGroup)
 {
     if (enGroup == CollisionComponent.ColliderGroup.Combat)
     {
         return this.lxHitboxColliders.Count != 0 && this.lxHitboxColliders[0].bIsActive;
     }
     return enGroup == CollisionComponent.ColliderGroup.Movement && this.lxMovementColliders.Count != 0 && this.lxMovementColliders[0].bIsActive;
 }