本文整理汇总了C#中SoG.AttackCollisionData类的典型用法代码示例。如果您正苦于以下问题:C# AttackCollisionData类的具体用法?C# AttackCollisionData怎么用?C# AttackCollisionData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AttackCollisionData类属于SoG命名空间,在下文中一共展示了AttackCollisionData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
}
示例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();
}
}
示例4: OnAttackHit
public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats)
{
if (xBaseStats == null)
{
this.bToBeDestroyed = true;
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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();
}
}
示例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]);
}
示例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);
}
}
示例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;
}