Exemplo n.º 1
0
        private void RevealObject(SimulationEvent e)
        {
            if (v3 != null)
            {
                string id       = ((StringValue)e["ObjectID"]).value;
                string type     = objectProxies[id].GetObjectType();
                bool   isWeapon = ((BooleanValue)objectProxies[id]["IsWeapon"].GetDataValue()).value;

                if (isWeapon)
                {
                    type = "Munition";
                }
                switch (type)
                {
                case "AirObject":
                    v3.RegisterObject(id, _aircraft);
                    break;

                case "SeaObject":
                    v3.RegisterObject(id, _seaSurface);
                    break;

                case "LandObject":
                    v3.RegisterObject(id, _landUnit);
                    break;

                case "Munition":
                    v3.RegisterObject(id, _munition);
                    break;
                }
            }
        }