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); } }
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; }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { foreach (DeligateEntity.OnHitByAttackDelegate x in this.lxOnHitByAttackDelegates) { x(xAtColData, xAtPhase); } }
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); } }
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(); } }
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; }
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; }
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; } }
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"); } }
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(); } } }
public void SetAttackPhase(Collider col, int iDamage) { if (this.xAttackPhase != null) { this.xAttackPhase.UnregisterCurrent(); } this.xAttackPhase = new AttackPhase(this); this.xAttackPhase.lxCurrentColliders.Add(col); this.xAttackPhase.xStats.iBaseDamage = iDamage; this.xAttackPhase.xStats.iBreakingPower = 1; this.xAttackPhase.xStats.fKnockBack = 20f; col.xAttackPhase = this.xAttackPhase; this.xAttackPhase.RegisterCurrent(); this.xAttackPhase.lenLayers.Add(Collider.ColliderLayers.Players); this.xAttackPhase.lenLayers.Add(Collider.ColliderLayers.EnivonmentalHazards); }
public AttackPhase CloneCurrent() { AttackPhase ret = new AttackPhase(this.xOwner); ret.xTransformOverride = this.xTransformOverride; ret.xStats = new AttackStats(); ret.xStats.CopyStats(this.xStats); ret.lxCurrentColliders = new List<Collider>(); for (int i = 0; i < this.lxCurrentColliders.Count; i++) { ret.lxCurrentColliders.Add(this.lxCurrentColliders[i].Clone(this.lxCurrentColliders[i].xMountTransform)); ret.lxCurrentColliders[i].xAttackPhase = ret; } ret.lenLayers = this.lenLayers; ret.enEffectEvent = this.enEffectEvent; ret.enEffectModifier = this.enEffectModifier; ret.bInAttackPhase = this.bInAttackPhase; return ret; }
public override void OnDeathOverride(AttackPhase xKillingAP) { if (Program.GetTheGame().xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client) { Vector2 v2FlyDir = Vector2.Normalize(this.xOwner.xTransform.v2Pos - xKillingAP.xOwner.xTransform.v2Pos); float fModifier = xKillingAP.xStats.fDamageModifier; if (fModifier > 1.5f) { fModifier = 1.5f; } v2FlyDir *= fModifier; base.SendClientInstruction(2, new float[] { v2FlyDir.X, v2FlyDir.Y }); } }
public SlimeBoss() { this.xSpinnerAttackPhase = new AttackPhase(this); this.xSpinnerAttackPhase.lenLayers.Add(Collider.ColliderLayers.Players); BoxCollider col = new BoxCollider(66, 40, 0f, new Vector2(0f, -7f), this.xTransform, 10000f, this); SphereCollider col2 = new SphereCollider(20f, new Vector2(-37f, -7f), this.xTransform, 10000f, this); SphereCollider col3 = new SphereCollider(20f, new Vector2(37f, -7f), this.xTransform, 10000f, this); this.xSpinnerAttackPhase.lxCurrentColliders.Add(col); this.xSpinnerAttackPhase.lxCurrentColliders.Add(col2); this.xSpinnerAttackPhase.lxCurrentColliders.Add(col3); col.xAttackPhase = this.xSpinnerAttackPhase; col2.xAttackPhase = this.xSpinnerAttackPhase; col3.xAttackPhase = this.xSpinnerAttackPhase; this.xSpinnerAttackPhase.xStats.fKnockBack = 40f; this.xSpinnerAttackPhase.xStats.iBaseDamage = 35; this.xSpinnerAttackPhase.xStats.enAttackElement = AttackStats.Element.Neutral; this.xSpinnerAttackPhase.xStats.enAttackType = AttackStats.Type.Physical; }
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); } }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { if (this.bImmortal || this.iToDestroy > 0) { return; } if (xAtPhase != null && xAtPhase.xStats.sAttackHandle == "Arrow") { this.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.xRenderComponent.iActiveAnimation + 1), Animation.CancelOptions.IgnoreIfPlaying); this.iToDestroy = 1; this.iDir = 0; this.xCollisionComponent.DeactivateGroup(CollisionComponent.ColliderGroup.All); xAtPhase.xStats.sAttackHandle = ""; int iValue = this.xOwnerBagman.HitTarget(this.iTier); base.SendNetworkInstruction(new float[] { 0f, (float)iValue }); Program.GetTheGame().xSoundSystem.PlayCue("Itemdrop", this.xTransform.v2Pos); Program.GetTheGame()._EffectMaster_AddEffect(new DamageNumbers(this.xTransform.v2Pos + new Vector2(0f, -12f), iValue, false, NoticeNumbers.NumberTileset.GreenNumbers)); } }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { Game1 master = Program.GetTheGame(); this.xBaseStats.iHP -= 10; 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; } if (master.xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client) { this.xStuckPlayer.xRenderComponent.SwitchAnimation(72, Animation.CancelOptions.RestartIfPlaying); } if (master.xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.Server) { if (this.xStuckPlayer != master.xLocalPlayer.xEntity) { NetOutgoingMessage om = master.xNetworkInfo.server.CreateMessage(); om.Write(49); om.Write(72); master.xNetworkInfo.server.SendMessage(om, this.xStuckPlayer.Owner.netConnection, NetDeliveryMethod.ReliableUnordered); } Program.GetTheGame()._DynamicEnvironment_SendOnHit(this.iID); } master._EffectMaster_AddEffect(new DamageNumbers(this.xTransform.v2Pos + new Vector2(0f, -12f), 5, false, NoticeNumbers.NumberTileset.RedNumbers)); }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { base.OnHitByAttack(xAtColData, xAtPhase); this.v2RandMoveDir = Vector2.Zero; this.bAggro = true; this.iWannaCircleBaby = 180; }
public override void Update() { this.iExistTimer++; if (this.iExistTimer % 30 == 0) { base.SendClientInstruction(1, new float[] { (float)this.iExistTimer }); } this.xTransform.v2Pos += this.v2Direction * this.fVelocity; this.xTransform.v2ServerPos = this.xTransform.v2Pos; Program.game.sErrorOutputAddon = "Staht! "; this.xTrailEffect.RegisterPAA(this.xTransform.v2Pos, 0); this.xTrailEffect.Update(); if (this.iStartup > 0) { this.iCounter++; if (this.iCounter < 60 && this.fVelocity < this.fFastVelocity) { this.fVelocity += 0.1f; } float fCurDir = Utility.Vector2ToRadiansReverse(this.v2Direction); float fTurnSpeed = 0.2f; fCurDir += fTurnSpeed; this.v2Direction = Utility.RadiansToVector2(fCurDir); this.iStartup--; if (this.iStartup == 0) { this.iCounter = 0; this.enState = _EnemySpells_CrowSwarm_OBSOLETE.State.FlyingFromTarget; this.iInAttackFlightCounter = this.iHurtBoxDelay; } return; } if (this.enState == _EnemySpells_CrowSwarm_OBSOLETE.State.FlyingToTarget || this.enState == _EnemySpells_CrowSwarm_OBSOLETE.State.FlyingFromTarget) { Program.game.sErrorOutputAddon = "Attaka! "; this.iInAttackFlightCounter++; if (CAS.NetworkRole != NetworkHelperInterface.NetworkRole.Client && !this.bToDie && this.iInAttackFlightCounter > this.iHurtBoxDelay && this.lxAttackPhases.Count < this.iAttackPhases && this.iInAttackFlightCounter - this.iHurtBoxDelay >= this.lxAttackPhases.Count) { AttackPhase xAPA = new AttackPhase(this); SphereCollider col = new SphereCollider(this.fAttackPhaseRadius, new Vector2(0f, 8f), new TransformComponent(Vector2.Zero), 0f, this); col.xAttackPhase = xAPA; col.bIsLarge = false; xAPA.lxCurrentColliders.Add(col); xAPA.xOwner = this; AttackStats xStat = new AttackStats(); xStat.fKnockBack = 0f; xStat.iBreakingPower = -1; xStat.iBaseDamage = 5; xStat.bDontTriggerPlayerInvincibility = true; xStat.bFlatArmorPenetration = true; xAPA.lenLayers.Add(Collider.ColliderLayers.Players); xAPA.lenLayers.Add(Collider.ColliderLayers.Neutrals); xAPA.xStats = xStat; xAPA.RegisterCurrent(); this.lxAttackPhases.Add(xAPA); } } if (CAS.NetworkRole != NetworkHelperInterface.NetworkRole.Client) { for (int i = 0; i < this.lxAttackPhases.Count; i++) { this.lxAttackPhases[i].lxCurrentColliders[0].xLocalTransform.v2Pos = this.xTrailEffect.GetRegisteredDelay(this.iHurtBoxDelay + (i + this.iRemovedPhases) * this.iDelayBetweenPhases); } } Program.game.sErrorOutputAddon = "Adastaff! "; if (this.enState == _EnemySpells_CrowSwarm_OBSOLETE.State.FlyingToTarget) { if (this.fVelocity < this.fFastVelocity) { this.fVelocity += 0.5f; } else { this.fVelocity = this.fFastVelocity; } if (Vector2.Distance(this.v2Target, this.xTransform.v2Pos) < this.fVelocity * 2f) { this.enState = _EnemySpells_CrowSwarm_OBSOLETE.State.FlyingFromTarget; this.iCounter = 0; } } else if (this.enState == _EnemySpells_CrowSwarm_OBSOLETE.State.FlyingFromTarget) { this.iCounter++; if (this.iCounter > this.iRubberBand && !this.bToDie) { this.enState = _EnemySpells_CrowSwarm_OBSOLETE.State.RecalibratingAim; this.v2Target = this.v2Origin + 50f * Utility.RandomizeVector2Direction(this.localRand); this.iCounter = 0; this.iInAttackFlightCounter = 0; } if (this.bToDie) { if (this.iCounter == this.iRubberBand + 60) { this.xTrailEffect.FadeOut(); } if (this.iCounter == this.iRubberBand + 120) { this.xTrailEffect.Destroy(); } } } else if (this.enState == _EnemySpells_CrowSwarm_OBSOLETE.State.RecalibratingAim) { Program.game.sErrorOutputAddon = "Recalibrata! "; Vector2 v2WantDir = (this.v2Target - this.xTransform.v2Pos).SafeNormalized(); float fWantDir = Utility.Vector2ToRadiansReverse(v2WantDir); float fCurDir2 = Utility.Vector2ToRadiansReverse(this.v2Direction); float fWantDirModified = fWantDir; if (fWantDirModified < 0f) { fWantDirModified += 6.28318548f; } float fCurDirModified = fCurDir2; if (fCurDirModified < 0f) { fCurDirModified += 6.28318548f; } this.iCounter++; if (CAS.NetworkRole != NetworkHelperInterface.NetworkRole.Client && this.lxAttackPhases.Count > 0 && this.iCounter > this.iHurtBoxDelay) { int iMos = this.iCounter - this.iHurtBoxDelay; if (this.iAttackPhases - iMos / this.iDelayBetweenPhases - 1 < this.lxAttackPhases.Count) { this.lxAttackPhases[0].UnregisterCurrent(); this.lxAttackPhases.RemoveAt(0); this.iRemovedPhases++; } } float fTurnSpeed2 = 0.035f; if (this.iCounter > 120) { fTurnSpeed2 += (float)(this.iCounter - 120) / 300f; } bool bFound = false; float fTurnDistance = MathHelper.Distance(fWantDirModified, fCurDirModified); if (fTurnDistance <= fTurnSpeed2) { bFound = true; fCurDir2 = fWantDir; } else { fCurDir2 += fTurnSpeed2; if (fCurDir2 > 3.14159274f) { fCurDir2 -= 6.28318548f; } } this.v2Direction = Utility.RadiansToVector2(fCurDir2); if (fTurnDistance > 0.7853982f) { this.fVelocity -= 0.1f; } else { this.fVelocity += 0.2f; } if (this.fVelocity < 2f) { this.fVelocity = 2f; } else if (this.fVelocity > this.fFastVelocity) { this.fVelocity = this.fFastVelocity; } if (bFound) { this.v2Direction = v2WantDir; this.enState = _EnemySpells_CrowSwarm_OBSOLETE.State.FlyingToTarget; this.iRemovedPhases = 0; for (int j = 0; j < this.lxAttackPhases.Count; j++) { this.lxAttackPhases[j].UnregisterCurrent(); this.lxAttackPhases.RemoveAt(j--); } } } Program.game.sErrorOutputAddon = "End! "; }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { if (this.iInvincibleTimeLeft <= 0 && this.enCurrentAction != SummerFaeAI.Action.ThornSpawn) { bool bChanged = this.enCurrentAction != SummerFaeAI.Action.TakingDamage; this.ChangeAction(SummerFaeAI.Action.TakingDamage); this.iCounter = 0; if (bChanged) { this.SendAction(true); } } if (this.iComboBreakCounter <= 0) { this.iHPAtHit = this.xOwner.xBaseStats.iHP; } this.iComboBreakCounter = 180; float fHPMos = (float)this.iHPAtHit / (float)this.xOwner.xBaseStats.iMaxHP; float fHPNu = (float)this.xOwner.xBaseStats.iHP / (float)this.xOwner.xBaseStats.iMaxHP; if (fHPNu + 0.1f < fHPMos) { this.GoDash(); } if (!this.bGonnaDie) { this.v2MoveDir = Vector2.Zero; } base.OnHitByAttack(xAtColData, xAtPhase); }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { base.OnHitByAttack(xAtColData, xAtPhase); this.iCounterAtLastAgressiveAction -= 100; this.fFurthestAllowedDistance = 700f; this.bEngaged = true; if (xAtPhase.xStats.enAttackElement == AttackStats.Element.Fire && this.xOwner.xRenderComponent.iActiveAnimation >= 6 && this.xOwner.xRenderComponent.iActiveAnimation <= 7) { this.xOwner.xRenderComponent.SwitchAnimation(this.xOwner.aiHitAnimation[(int)this.xOwner.xRenderComponent.GetCurrentAnimation().byAnimationDirection], Animation.CancelOptions.RestartIfPlaying); if (this.xRootInstance != null) { this.xRootInstance.Free(); return; } } else if (this.xRootInstance != null) { this.xRootInstance.IncrementForceCancel(); } }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { this.bToBeDestroyed = true; }
public override void OnDeathOverride(AttackPhase xKillingAP) { this.xOwner.xRenderComponent.SwitchAnimation(9); this.bIncapacitated = true; this.xOwner.xCollisionComponent.DeactivateGroup(CollisionComponent.ColliderGroup.Combat); this.xOwner.xCollisionComponent.xMovementCollider.fWeight = 30f; }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { base.OnHitByAttack(xAtColData, xAtPhase); this.fFurthestAllowedDistance = 500f; this.AddHitEffect(); if (Program.game.xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.Server) { base.SendClientInstruction(0, new float[0]); } }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { if (xAtPhase.xStats.iBreakingPower >= this.xOwner.xBaseStats.iKnockbackResistance) { this.iNextHardUpdate = 16; this.enCurrentAction = FrostyFriendLevelOneAI.FrostyFriendAction.TakingDamage; } if (!this.bGonnaDie) { this.v2RandMoveDir = Vector2.Zero; } base.OnHitByAttack(xAtColData, xAtPhase); NetworkHelperInterface.NetworkRole arg_58_0 = Program.game.xNetworkInfo.enCurrentRole; }
public override void OnDeathOverride(AttackPhase xKillingAP) { if (Program.game.xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client) { Vector2 v2FlyDir = Vector2.Normalize(this.xOwner.xTransform.v2Pos - xKillingAP.xOwner.xTransform.v2Pos); float fModifier = xKillingAP.xStats.fDamageModifier; if (fModifier > 1.5f) { fModifier = 1.5f; } v2FlyDir *= fModifier; this.Kill(v2FlyDir); base.SendClientInstruction(4, new float[] { v2FlyDir.X, v2FlyDir.Y }); Program.game._Enemies_ReportWorldActorRemoval(this.xOwner); } }
public override void OnDeathOverride(AttackPhase xKillingAP) { this.Kill(); }
public void SetInfo(Collider col, int iDamage, WorldActor xOrbitAround) { this.xAttackPhase = new AttackPhase(this); this.xAttackPhase.lxCurrentColliders.Add(col); this.xAttackPhase.xStats.iBaseDamage = iDamage; this.xAttackPhase.xStats.iBreakingPower = 1; this.xAttackPhase.xStats.fKnockBack = 20f; col.xAttackPhase = this.xAttackPhase; this.xAttackPhase.RegisterCurrent(); this.xAttackPhase.lenLayers.Add(Collider.ColliderLayers.Players); this.xAttackPhase.lenLayers.Add(Collider.ColliderLayers.EnivonmentalHazards); this.xOrbitAroundThis = xOrbitAround; SphereCollider colHitbox = new SphereCollider(5f, new Vector2(0f, -2f), this.xTransform, 0f, this); colHitbox.xBaseStats = new BaseStats(this); this.xCollisionComponent.AddHitboxCollider(colHitbox, Collider.ColliderLayers.Enemies); }
public override void OnHitByAttack(AttackCollisionData xAtColData, AttackPhase xAtPhase) { if (!this.bGonnaDie) { this.v2RandMoveDir = Vector2.Zero; } base.OnHitByAttack(xAtColData, xAtPhase); }