private void ThinkTrack() { --this.m_FindNewTargDelay; if (this.m_CurrentTarget == null || this.m_Home == null && (this.m_Gardener == null || !Ship.IsActiveShip(this.m_Gardener)) || this.m_FindNewTargDelay <= 0) { this.SetTarget((IGameObject)null); this.m_State = ProteanCombatStates.SEEK; } else { Ship currentTarget = this.m_CurrentTarget as Ship; if (currentTarget == null) { return; } Vector3 vector3 = this.m_HasGardener ? this.m_LastGardenerPos : this.m_Home.Parameters.Position; float num1 = this.m_HasGardener ? this.m_GardenerRadius : this.m_Home.Parameters.Radius; float lengthSquared = (vector3 - currentTarget.Position).LengthSquared; float num2 = (float)((double)num1 + (double)this.m_Protean.SensorRange + 20000.0); if (Ship.IsActiveShip(currentTarget) && (double)lengthSquared <= (double)num2 * (double)num2) { return; } this.SetTarget((IGameObject)null); this.m_State = ProteanCombatStates.SEEK; this.m_Protean.Maneuvering.PostAddGoal(this.m_Home.Parameters.Position, -Vector3.UnitZ); } }
private void ThinkSeek() { if (this.m_CurrentTarget == null) { return; } this.m_FindNewTargDelay = 300; this.m_State = ProteanCombatStates.TRACK; }
private void ThinkInit() { if (this.m_Home == null) { return; } this.m_Protean.Maneuvering.PostAddGoal(this.m_Home.Parameters.Position, -Vector3.UnitZ); this.m_State = ProteanCombatStates.SEEK; }
public override void Initialize() { this.m_CurrentTarget = (IGameObject)null; this.m_Gardener = (Ship)null; this.m_State = ProteanCombatStates.INIT; this.m_FindNewTargDelay = 300; this.m_Gardener = (Ship)null; this.m_HasGardener = false; this.m_LastGardenerPos = Vector3.Zero; this.m_GardenerRadius = 0.0f; this.m_Victory = false; }