• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SoG.AttackCollisionData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SoG.AttackCollisionData的典型用法代码示例。如果您正苦于以下问题:C# AttackCollisionData类的具体用法?C# AttackCollisionData怎么用?C# AttackCollisionData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AttackCollisionData类属于SoG命名空间,在下文中一共展示了AttackCollisionData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     if (xAtPhase.xStats.bNonDamaging)
     {
         return;
     }
     Program.GetTheGame();
     this.xBaseStats.iHP -= 30;
     Random knark = Program.GetTheGame().randomInVisual;
     Vector2 v2Orig = this.xTransform.v2Pos;
     for (int i = 0; i < 6; i++)
     {
         Vector2 v2RandDir = new Vector2(-1f + (float)knark.NextDouble() * 2f, -1f + (float)knark.NextDouble() * 2f);
         if (v2RandDir == Vector2.Zero)
         {
             v2RandDir = new Vector2(1f, 0f);
         }
         v2RandDir.Normalize();
         float fRandGrade = (float)knark.NextDouble();
         SortedAnimated eff = Program.GetTheGame()._EffectMaster_AddEffect(new _Effect_MovingAnimated(v2Orig, SortedAnimated.SortedAnimatedEffects._HitEffect_SlimeParticle, v2RandDir * (0.5f + (float)Program.GetTheGame().randomInVisual.NextDouble() * 2f), 35 + (int)(25f * fRandGrade), 25, 0.9f)) as SortedAnimated;
         eff.xRenderComponent.fVirtualHeight += this.xRenderComponent.fVirtualHeight;
         (eff.xRenderComponent as AnimatedRenderComponent).fAnimationTimeWarp = 0.7f + fRandGrade * 0.6f;
     }
     this.iShakeCountDown = 14;
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:25,代码来源:FrozenPlayer.cs


示例2: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (xBaseStats != null)
     {
         this.bDidHitMonster = true;
     }
     if (this.bReflectableOnPerfectGuard && xAtColData.bShielded && xBaseStats.iPerfectGuardBonus > 0)
     {
         Vector2 v2NewDir = this.v2Direction * -1f;
         v2NewDir.Normalize();
         base.SendClientInstruction(0, new float[]
         {
             v2NewDir.X,
             v2NewDir.Y
         });
         this.xAttackPhaseEnemy.lenLayers.Remove(Collider.ColliderLayers.Players);
         this.xAttackPhaseEnemy.lenLayers.Remove(Collider.ColliderLayers.Neutrals);
         this.xAttackPhaseEnemy.lenLayers.Add(Collider.ColliderLayers.Enemies);
         this.xAttackPhaseEnemy.lenLayers.Add(Collider.ColliderLayers.DynamicEnvironment);
         this.xAttackPhaseEnemy.xStats.iBaseDamage *= 5;
         if (xBaseStats.xOwner.enEntityType == IEntity.EntityType.Player && (xBaseStats.xOwner as PlayerEntity).Owner.xEquipment.lenActiveEquipmentEffects.Contains(EquipmentInfo.SpecialEffect._Unique_WispShield_BetterProjectileReflect))
         {
             this.xAttackPhaseEnemy.xStats.iBaseDamage = (int)((float)this.xAttackPhaseEnemy.xStats.iBaseDamage * 1.5f);
         }
         this.v2Direction = v2NewDir;
         this.xOwner = xBaseStats.xOwner;
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:28,代码来源:_Spells_WindSliceInstance.cs


示例3: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (xBaseStats != null)
     {
         this.bDidHitMonster = true;
     }
     if (xAtColData.bShielded && xBaseStats.iPerfectGuardBonus > 0)
     {
         Vector2 v2Normal = Utility.AnimationDirectionToVector2((int)(xBaseStats.xOwner as PlayerEntity).byAnimationDirection);
         (this.v2Direction - 2f * (Vector2.Dot(this.v2Direction, v2Normal) * v2Normal)).Normalize();
         this.xAttackPhasePlayer.xStats.sAttackHandle = "PGTest";
         this.xAttackPhasePlayer.lenLayers.Remove(Collider.ColliderLayers.Players);
         this.xAttackPhasePlayer.lenLayers.Remove(Collider.ColliderLayers.Neutrals);
         this.xAttackPhasePlayer.lenLayers.Add(Collider.ColliderLayers.DynamicEnvironment);
         this.xAttackPhasePlayer.xStats.iBaseDamage *= 3;
         this.v2Direction *= -1f;
         this.xOwner = xBaseStats.xOwner;
         this.xRenderComponent.fScale = 0.2f;
         this.xRenderComponent.cColor = Color.Aqua;
         this.xRenderComponent.fAlpha = 0.5f;
         this.xChallengePG.ShotGuarded();
         return;
     }
     this.bToBeDestroyed = true;
     if (this.xAttackPhasePlayer.xStats.sAttackHandle != "PGTest")
     {
         this.xChallengePG.Fail();
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:29,代码来源:_EnemySpells_PGTestGuardableProjectileRoguelike.cs


示例4: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (xBaseStats == null)
     {
         this.bToBeDestroyed = true;
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:7,代码来源:_Spells_IcespikeInstance.cs


示例5: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (xBaseStats != null)
     {
         this.bDidHitMonster = true;
     }
     if (xAtColData.bShielded && xBaseStats.bPerfectGuardedThisFrame)
     {
         Vector2 v2Normal = Utility.AnimationDirectionToVector2((int)(xBaseStats.xOwner as PlayerEntity).byAnimationDirection);
         (this.v2Direction - 2f * (Vector2.Dot(this.v2Direction, v2Normal) * v2Normal)).Normalize();
         this.xAttackPhasePlayer.lenLayers.Remove(Collider.ColliderLayers.Players);
         this.xAttackPhasePlayer.lenLayers.Remove(Collider.ColliderLayers.Neutrals);
         this.xAttackPhasePlayer.lenLayers.Add(Collider.ColliderLayers.Enemies);
         this.v2Direction *= -1f;
         this.xAttackPhasePlayer.xStats.v2KnockbackDirectionOverride = this.v2Direction;
         this.xAttackPhasePlayer.xStats.iBaseDamage *= 5;
         this.xOwner = xBaseStats.xOwner;
         if (xBaseStats.xOwner.enEntityType == IEntity.EntityType.Player && (xBaseStats.xOwner as PlayerEntity).Owner.xEquipment.lenActiveEquipmentEffects.Contains(EquipmentInfo.SpecialEffect._Unique_WispShield_BetterProjectileReflect))
         {
             this.xAttackPhasePlayer.xStats.iBaseDamage = (int)((float)this.xAttackPhasePlayer.xStats.iBaseDamage * 1.5f);
             return;
         }
     }
     else
     {
         this.bToBeDestroyed = true;
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:28,代码来源:_EnemySpells_JackLanternProjectile.cs


示例6: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (xBaseStats != null)
     {
         this.bDidHitMonster = true;
     }
     PlayerEntity xPlayer;
     if ((xPlayer = (xBaseStats.xOwner as PlayerEntity)) != null)
     {
         if (!Utility.IsWithinRange((int)xPlayer.xRenderComponent.iActiveAnimation, 2600, 2603))
         {
             FrozenPlayer xMos = (FrozenPlayer)Program.game._EntityMaster_AddDynamicEnvironment(DynamicEnvironmentCodex.ObjectTypes.Debuff_Freeze, xPlayer.xTransform.v2Pos);
             xMos.SetPlayer(xPlayer);
         }
         float fDuration = 300f;
         float fSlowFactor = 0.7f;
         xBaseStats.AddStatusEffect(BaseStats.StatusEffectSource.Chilled, (int)fDuration);
         xBaseStats.AddStatusEffect(BaseStats.StatusEffectSource.SlowLv1, (int)fDuration);
         if (!xBaseStats.bSlowImmunity)
         {
             xBaseStats.AddPercentageMoveSpeedDeBuff(new BaseStats.BuffFloat((int)fDuration, fSlowFactor));
         }
     }
     this.bToBeDestroyed = true;
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:25,代码来源:_EnemySpells_WinterHydraBreath.cs


示例7: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (this.xOwnerEnemy != null)
     {
         return;
     }
     if (xBaseStats != null)
     {
         this.bDidHitMonster = true;
     }
     if (xBaseStats == null || !(xBaseStats.xOwner is PlayerEntity))
     {
         this.v2Direction *= -1f;
         this.fCurrentRot += 3.14159274f;
         return;
     }
     if (this.iCooldown > 0)
     {
         return;
     }
     this.iCooldown = 60;
     PlayerEntity xCaughtPlayer = xBaseStats.xOwner as PlayerEntity;
     TornadoedPlayer xLol = (TornadoedPlayer)Program.game._EntityMaster_AddDynamicEnvironment(DynamicEnvironmentCodex.ObjectTypes.Debuff_TornadoCatch, Vector2.Zero);
     xLol.SetPlayer(xCaughtPlayer, this);
     this.xAttackPhaseEnvironment.lxCurrentColliders[0].ibitLayers |= xCaughtPlayer.xCollisionComponent.ibitCurrentColliderLayer;
     this.xCurrentCaught = xCaughtPlayer;
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:27,代码来源:_EnemySpells_Tornado.cs


示例8: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     if (xAtPhase.xStats.sAttackHandle != "2HBasic" && xAtPhase.xStats.sAttackHandle != "1HBasic")
     {
         return;
     }
     Vector2 v2MosPos = xAtPhase.xOwner.xTransform.v2Pos;
     Vector2 v2Local = v2MosPos - this.xTransform.v2Pos;
     if (v2Local.X < 21f)
     {
         this.ClockHit(0);
         this.xLeftClock.xRenderComponent.AsAnimated().SwitchAnimation(1);
     }
     else if (v2Local.X < 45f)
     {
         this.ClockHit(1);
         this.xMidClock.xRenderComponent.AsAnimated().SwitchAnimation(1);
     }
     else if (v2Local.X < 69f)
     {
         this.ClockHit(2);
         this.xRightClock.xRenderComponent.AsAnimated().SwitchAnimation(1);
     }
     if (this.xRenderComponent.iActiveAnimation == 0)
     {
         this.xRenderComponent.SwitchAnimation(1, Animation.CancelOptions.RestartIfPlaying, 0.75f + (float)Program.GetTheGame().randomInVisual.NextDouble() * 0.5f);
         Program.GetTheGame()._DynamicEnvironment_SendOnHit(this.iID);
     }
     if (this.sSoundOnHit != "")
     {
         Program.GetTheGame().xSoundSystem.PlayCue(this.sSoundOnHit, this.xTransform.v2Pos);
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:33,代码来源:Puzzle_WinterlandGlockenSpiel.cs


示例9: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     base.OnAttackHit(xAtColData, xBaseStats);
     if (xAtColData.bShielded)
     {
         this.xOwner.xRenderComponent.SwitchAnimation((ushort)(this.xOwner.xRenderComponent.GetCurrentAnimation().byAnimationDirection + 22), Animation.CancelOptions.UseAnimationDefault);
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:8,代码来源:FreddyFirst_MK2.cs


示例10: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     base.OnHitByAttack(xAtColData, xAtPhase);
     if (xAtPhase.xStats.enAttackElement == AttackStats.Element.Fire && (this.xOwner.xRenderComponent.iActiveAnimation < 8 || this.xOwner.xRenderComponent.iActiveAnimation > 11))
     {
         this.xOwner.xRenderComponent.SwitchAnimation(this.xOwner.aiHitAnimation[(int)this.xOwner.xRenderComponent.GetCurrentAnimation().byAnimationDirection], Animation.CancelOptions.RestartIfPlaying);
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:8,代码来源:BlommaAI.cs


示例11: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     if (this.iCounter < this.iExplodeAt - 5)
     {
         this.iCounter = this.iExplodeAt - 5;
     }
     int arg_2B_0 = this.iTimesHit;
     int arg_2A_0 = this.iTimesToHitBeforeDestroy;
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:9,代码来源:Bomb.cs


示例12: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     base.OnHitByAttack(xAtColData, xAtPhase);
     this.xRenderComponent.AsAnimated().SwitchAnimation(3, Animation.CancelOptions.IgnoreIfPlaying);
     if (this.iTimesHit >= this.iTimesToHitBeforeDestroy && this.xAttackPhase != null)
     {
         this.xAttackPhase.UnregisterCurrent();
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:9,代码来源:DamagingCrateArchetype.cs


示例13: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (xBaseStats != null)
     {
         this.bDidHitMonster = true;
     }
     this.bToBeDestroyed = true;
     base.SendClientInstruction(0, new float[0]);
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:9,代码来源:_EnemySpells_GenericOrbitBullet.cs


示例14: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (!xAtColData.bShielded && Program.GetTheGame().bEffectsOn)
     {
         IEffect kaktus = Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(xAtColData.v2PointOfImpact, SortedAnimated.SortedAnimatedEffects._HitEffect_Pang1));
         kaktus.xRenderComponent.fVirtualHeight += this.xOwner.xRenderComponent.fVirtualHeight;
         kaktus.xRenderComponent.xTransform = xBaseStats.xOwner.xTransform;
         kaktus.xRenderComponent.v2OffsetRenderPos = new Vector2(0f, -10f);
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:10,代码来源:RedSlimeAI.cs


示例15: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     base.OnHitByAttack(xAtColData, xAtPhase);
     this.v2RandMoveDir = Vector2.Zero;
     this.iNextHardUpdate = 0;
     this.bAggro = true;
     this.iDowned = 0;
     this.iShieldKnockLol = 0;
     this.iWannaCircleBaby = 180;
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:10,代码来源:FreddyFirst_MK2.cs


示例16: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     Game1 xLol = Program.GetTheGame();
     if (this.enHitEffect != SortedAnimated.SortedAnimatedEffects.None)
     {
         xLol._EffectMaster_AddEffect(new SortedAnimated(this.xTransform.v2Pos, this.enHitEffect));
     }
     if (this.bDestroyOnHit)
     {
         this.bToBeDestroyed = true;
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:12,代码来源:DynamicEnvironment.cs


示例17: OnAttackHit

 public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
 {
     if (this.iPowerLevel == 5)
     {
         return;
     }
     this.bToBeDestroyed = true;
     SortedAnimated xDestroy = new SortedAnimated(this.xTransform.v2Pos + this.xRenderComponent.v2OffsetRenderPos, SortedAnimated.SortedAnimatedEffects._SpellEffects_Fire_FireballImpact);
     xDestroy.xRenderComponent.fVirtualHeight = this.xRenderComponent.fVirtualHeight + 10f;
     Program.GetTheGame()._EffectMaster_AddEffect(xDestroy);
     base.SendClientInstruction(0, new float[0]);
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:12,代码来源:_Spells_FireballInstance.cs


示例18: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     if (xAtPhase != null && xAtPhase.xStats.sAttackHandle == "Arrow")
     {
         this.bToBeDestroyed = true;
         this.AddZeArrow(xAtColData.v2PointOfImpact);
         base.SendNetworkInstruction(new float[]
         {
             0f,
             xAtColData.v2PointOfImpact.X,
             xAtColData.v2PointOfImpact.Y
         });
         Program.game.xSoundSystem.PlayInterfaceCue("puzzle_solved_fanfare");
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:15,代码来源:Unique_ArrowShieldSouthField.cs


示例19: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     if (xAtPhase != null)
     {
         IEntity mos = xAtPhase.xOwner.GetTrueOwner();
         if (mos.enEntityType != IEntity.EntityType.Enemy)
         {
             return;
         }
         if ((mos as Enemy).enType == EnemyCodex.EnemyTypes.Boar && xAtPhase.xStats.sAttackHandle == "BoarCharge")
         {
             this.bToBeDestroyed = true;
             ((mos as Enemy).xBehaviour as BoarAI).BounceBack();
         }
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:16,代码来源:Unique_BreakableRockWestField.cs


示例20: OnHitByAttack

 public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase)
 {
     this.iTimesHit++;
     if (xAtPhase != null)
     {
         this.iTimesHit += xAtPhase.xStats.iBreakingPower / 2;
     }
     if (this.iTimesHit >= this.iTimesToHitBeforeDestroy)
     {
         this.Destroy();
         return;
     }
     this.xRenderComponent.SwitchAnimation(1, Animation.CancelOptions.RestartIfPlaying);
     Program.GetTheGame()._DynamicEnvironment_SendOnHit(this.iID);
     if (this.sOnHitSound != "")
     {
         Program.GetTheGame().xSoundSystem.PlayCue(this.sOnHitSound, this.xTransform.v2Pos);
     }
 }
开发者ID:ancientgods,项目名称:SoG,代码行数:19,代码来源:CrateArchetype.cs



注:本文中的SoG.AttackCollisionData类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SoG.PlayerView类代码示例发布时间:2022-05-26
下一篇:
C# Storage.SqlDatabaseClient类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap