public override void Load(ValuesDictionary valuesDictionary, IdToEntityMap idToEntityMap)
 {
     m_subsystemTerrain          = base.Project.FindSubsystem <SubsystemTerrain>(throwOnError: true);
     m_subsystemAnimatedTextures = base.Project.FindSubsystem <SubsystemAnimatedTextures>(throwOnError: true);
     m_subsystemSky    = base.Project.FindSubsystem <SubsystemSky>(throwOnError: true);
     m_componentPlayer = base.Entity.FindComponent <ComponentPlayer>(throwOnError: true);
     m_shader          = ContentManager.Get <Shader>("Shaders/Highlight");
 }
Ejemplo n.º 2
0
 public TerrainRenderer(SubsystemTerrain subsystemTerrain)
 {
     m_subsystemTerrain          = subsystemTerrain;
     m_subsystemSky              = subsystemTerrain.Project.FindSubsystem <SubsystemSky>(throwOnError: true);
     m_subsystemAnimatedTextures = subsystemTerrain.SubsystemAnimatedTextures;
     m_opaqueShader              = ContentManager.Get <Shader>("Shaders/Opaque");
     m_alphaTestedShader         = ContentManager.Get <Shader>("Shaders/AlphaTested");
     m_transparentShader         = ContentManager.Get <Shader>("Shaders/Transparent");
     Display.DeviceReset        += Display_DeviceReset;
 }
 public override void Load(ValuesDictionary valuesDictionary)
 {
     m_subsystemTime             = base.Project.FindSubsystem <SubsystemTime>(throwOnError: true);
     m_subsystemTerrain          = base.Project.FindSubsystem <SubsystemTerrain>(throwOnError: true);
     m_subsystemSky              = base.Project.FindSubsystem <SubsystemSky>(throwOnError: true);
     m_subsystemAnimatedTextures = base.Project.FindSubsystem <SubsystemAnimatedTextures>(throwOnError: true);
     m_shader = ContentManager.Get <Shader>("Shaders/AlphaTested");
     foreach (ValuesDictionary value9 in valuesDictionary.GetValue <ValuesDictionary>("MovingBlockSets").Values)
     {
         Vector3            value  = value9.GetValue <Vector3>("Position");
         Vector3            value2 = value9.GetValue <Vector3>("TargetPosition");
         float              value3 = value9.GetValue <float>("Speed");
         float              value4 = value9.GetValue <float>("Acceleration");
         float              value5 = value9.GetValue <float>("Drag");
         Vector2            value6 = value9.GetValue("Smoothness", Vector2.Zero);
         string             value7 = value9.GetValue <string>("Id", null);
         object             value8 = value9.GetValue <object>("Tag", null);
         List <MovingBlock> list   = new List <MovingBlock>();
         string[]           array  = value9.GetValue <string>("Blocks").Split(new char[1]
         {
             ';'
         }, StringSplitOptions.RemoveEmptyEntries);
         foreach (string obj2 in array)
         {
             MovingBlock item   = default(MovingBlock);
             string[]    array2 = obj2.Split(new char[1]
             {
                 ','
             }, StringSplitOptions.RemoveEmptyEntries);
             item.Value    = HumanReadableConverter.ConvertFromString <int>(array2[0]);
             item.Offset.X = HumanReadableConverter.ConvertFromString <int>(array2[1]);
             item.Offset.Y = HumanReadableConverter.ConvertFromString <int>(array2[2]);
             item.Offset.Z = HumanReadableConverter.ConvertFromString <int>(array2[3]);
             list.Add(item);
         }
         AddMovingBlockSet(value, value2, value3, value4, value5, value6, list, value7, value8, testCollision: false);
     }
 }