public void SetMist(MistComponent mist)
        {
            bool bMistEnable = false;

            if (mist != null)
            {
                u_mistColour.LoadUniform(mist.MistColour);
                bMistEnable = true;
            }

            u_mistEnable.LoadUniform(bMistEnable);
        }
Esempio n. 2
0
        public Entity(string modelPath, string texturePath, string normalMapPath, string specularMapPath,
                      Vector3 translation, Vector3 rotation, Vector3 scale) : base()
        {
            ComponentTranslation = translation;
            ComponentRotation    = rotation;
            ComponentScale       = scale;
            bVisibleByCamera     = true;
            m_mist     = null;
            m_material = new Material(new Vector3(1.0f, 1.0f, 1.0f), new Vector3(1.0f, 1.0f, 1.0f),
                                      new Vector3(1.0f, 1.0f, 1.0f), new Vector3(1.0f, 1.0f, 1.0f), 20.0f, 1.0f);

            InitResources(modelPath, texturePath, normalMapPath, specularMapPath);
        }
 public void SetMist(MistComponent mist)
 {
     if (mist != null)
     {
         u_mistEnable.LoadUniform(true);
         u_mistGradient.LoadUniform(mist.MistGradient);
         u_mistDensity.LoadUniform(mist.MistDensity);
         u_mistColour.LoadUniform(mist.MistColour);
     }
     else
     {
         u_mistEnable.LoadUniform(false);
     }
 }
Esempio n. 4
0
        public void setMist(MistComponent mistComponent)
        {
            bool bEnableMist = false;

            if (mistComponent != null)
            {
                u_mistDensity.LoadUniform(mistComponent.MistDensity);
                u_mistGradient.LoadUniform(mistComponent.MistGradient);
                u_mistColour.LoadUniform(mistComponent.MistColour);
                bEnableMist = true;
            }

            u_mistEnable.LoadUniform(bEnableMist);
        }
Esempio n. 5
0
        public PlantReadyMaster(Int32 entityCount, float MAP_SIZE, VBOArrayF ModelAttribs, Vector3 Scale,
                                string[] textureSets, WindComponent component, MistComponent mist = null)
        {
            _postConstructor = true;
            _attribs         = ModelAttribs;
            _texture         = new List <ITexture>();
            foreach (var item in textureSets)
            {
                _texture.Add(PoolProxy.GetResource <ObtainTexturePool, TextureAllocationPolicy, string, ITexture>(item));
            }
            this.MAP_SIZE  = MAP_SIZE;
            entityCount    = entityCount > MAX_ENTITIES_COUNT ? MAX_ENTITIES_COUNT : entityCount;
            _grassMaterial = new Material(new Vector3(1.0f, 1.0f, 1.0f), new Vector3(1.0f, 1.0f, 1.0f),
                                          new Vector3(1.0f, 1.0f, 1.0f), new Vector3(1.0f, 1.0f, 1.0f), 10.0f, 1.0f);

            _meshCenter = GetCenter();
            _plants     = new List <PlantUnit>();
            for (Int32 i = 0; i < entityCount; i++)
            {
                _plants.Add(new PlantUnit(i, Scale, MAP_SIZE, new uint[] { 1, 2, 3 }));
            }
            this._wind = component;
            this._mist = mist;
        }
Esempio n. 6
0
 public void SetMist(MistComponent mist)
 {
     this._mist = mist;
 }
Esempio n. 7
0
 public void PostDeserializePass(MistComponent mistComponent)
 {
     _mist = mistComponent;
 }
Esempio n. 8
0
 public void SetMist(MistComponent mist)
 {
     m_mist = mist;
 }
Esempio n. 9
0
 public void setMistComponent(MistComponent mist)
 {
     this.m_mist = mist;
 }
Esempio n. 10
0
 public void PostDeserializePass(MistComponent mistComponent, CollisionHeadUnit collisionHeadUnit)
 {
     m_mist = mistComponent;
     SetCollisionHeadUnit(collisionHeadUnit);
 }