Exemplo n.º 1
0
        public static bool UpdateSmallDebrisScript(MySmallDebris smallDebris)
        {
            if (smallDebris.ModelLod0.ModelEnum == MyModelsEnum.cistern)
            {
                if (m_outpostReached == true && m_primaryTargetTextAlreadyAdded == false)
                {
                    bool containsHud = MyHud.ContainsTextForEntity(smallDebris);
                    if (containsHud == false)
                    {
                        MyHud.AddText(smallDebris, new StringBuilder("Primary target"), Color.Green);
                    }
                }

                if (smallDebris.IsDestroyed())
                {
                    MyHud.RemoveText(smallDebris);
                    //  small ship explosion!
                    MyExplosion explosion         = MyExplosions.AddExplosion();
                    Vector3     explosionPosition = smallDebris.GetPosition();
                    if (explosion != null)
                    {
                        explosion.Start(
                            MyExplosionTypeEnum.SMALL_SHIP_EXPLOSION, new BoundingSphere(explosionPosition,
                                                                                         MyMwcUtils.GetRandomFloat(MyExplosionsConstants.EXPLOSION_RANDOM_RADIUS_MIN, MyExplosionsConstants.EXPLOSION_RANDOM_RADIUS_MAX)),
                            MyExplosionsConstants.EXPLOSION_LIFESPAN);
                    }

                    smallDebris.Close();
                    m_remainingPrimaryTargetsCounter--;
                    return(false);
                }
            }

            return(true);
        }
Exemplo n.º 2
0
        public static bool UpdateInfluenceSphereSoundScript(MyInfluenceSphereSound influenceSphereSound)
        {
            if ((m_remainingPrimaryTargetsCounter == 0) && (MyHud.ContainsTextForEntity(influenceSphereSound) == false))
            {
                MyHud.AddText(influenceSphereSound, new StringBuilder("Russian Drop Zone"), Color.Green);
            }

            return(true);
        }
Exemplo n.º 3
0
        public static bool UpdateStaticAsteroidScript(MyStaticAsteroid staticAsteroid)
        {
            if (MyHud.ContainsTextForEntity(staticAsteroid))
            {
                if (m_outpostReached == false)
                {
                    if (Vector3.Distance(MySession.PlayerShip.GetPosition(), staticAsteroid.GetPosition()) < REMOVE_FROM_HUD_POSSIBLE_OUTPOST_DISTANCE)
                    {
                        MyHud.RemoveText(staticAsteroid);
                    }
                }
                else
                {
                    MyHud.RemoveText(staticAsteroid);
                }
            }

            return(true);
        }
Exemplo n.º 4
0
        public static bool UpdateVoxelMapScript(MyVoxelMap voxelMap)
        {
            if (MyHud.ContainsTextForEntity(voxelMap))
            {
                if (m_outpostReached == false)
                {
                    if (Vector3.Distance(MySession.PlayerShip.GetPosition(), voxelMap.GetPosition()) < REMOVE_FROM_HUD_POSSIBLE_OUTPOST_DISTANCE)
                    {
                        MyHud.RemoveText(voxelMap);
                    }
                }
                else
                {
                    MyHud.RemoveText(voxelMap);
                }
            }

            return(true);
        }