public void Attack(CombatStance stance = CombatStance.Concentrated) { if (Weapon == null) { return; } if (Weapon.AttackState == 0) { Weapon.AttackState = 1; } }
public override void SetTarget(IGameObject target) { if (target == this.m_Target) { return; } this.m_Target = target; int num = target != null ? target.ObjectID : 0; CombatStance stance = num != 0 ? CombatStance.PURSUE : CombatStance.NO_STANCE; if (this.m_VonNeumannChild.CombatStance != stance) { this.m_VonNeumannChild.SetCombatStance(stance); } this.m_VonNeumannChild.Maneuvering.PostSetProp("SetStanceTarget", (object)num, (object)this.m_ApproachRange); }
public override void SetTarget(IGameObject target) { if (target != this.m_CurrentTarget) { int targetId = 0; CombatStance stance = CombatStance.NO_STANCE; float num = 0.0f; if (target != null) { targetId = target.ObjectID; stance = CombatStance.PURSUE; num = Math.Max(CombatAI.GetMinEffectiveWeaponRange(this.m_Protean, false), 500f); } this.m_Protean.SetCombatStance(stance); this.m_Protean.SetShipTarget(targetId, Vector3.Zero, true, 0); this.m_Protean.Maneuvering.PostSetProp("SetStanceTarget", (object)targetId, (object)num); } this.m_CurrentTarget = target; }
void SetStance() { CombatMoveSet cms; CombatStance stance1 = new CombatStance(); if (speciesId == 0) //TO DO //get rid of this check and just handle it correctly { cms = new CombatMoveSet(); cms.iconIndex = 0; cms.moves.Add(segments[1].limbs[0].combatActions[0]); //right major tentacle cms.moves.Add(segments[1].limbs[1].combatActions[0]); //left major tentacle stance1.combatMoveSets[0] = cms; cms = new CombatMoveSet(); cms.iconIndex = 1; cms.moves.Add(segments[1].limbs[2].combatActions[0]); //bite stance1.combatMoveSets[1] = cms; } stances.Add(stance1); }