コード例 #1
0
ファイル: Light.cs プロジェクト: vblanco20-1/AngryBoids
        public void Activate(bool activate, bool force = false)
        {
            if((activate && !Activated) || force)
            {
                Activated = true;

                var lightParams = new LightParams();
                lightParams.lightStyle = LightStyle;
                lightParams.origin = Vec3.Zero;
                lightParams.lightFrustumAngle = 45;
                lightParams.radius = Radius;
                lightParams.coronaScale = CoronaScale;
                lightParams.coronaIntensity = CoronaIntensity;
                lightParams.coronaDistSizeFactor = CoronaDistSizeFactor;
                lightParams.coronaDistIntensityFactor = CoronaDistIntensityFactor;

                lightParams.color = DiffuseColor;
                lightParams.specularMultiplier = SpecularMultiplier;

                lightParams.hdrDynamic = HDRDynamic;

                LoadLight(lightParams, LightSlot);
            }
            else
            {
                Activated = false;
                FreeSlot(LightSlot);
            }
        }
コード例 #2
0
ファイル: Cursor.cs プロジェクト: vblanco20-1/AngryBoids
        public override void OnSpawn()
        {
            var light = new LightParams
            {
                radius = 5,
                color = Color.Red,
                hdrDynamic = 2
            };

            LoadLight(light);
            LoadObject("objects/effects/particle_effects/bubble/3dbubble.cgf");

            ReceiveUpdates = true;
        }
コード例 #3
0
ファイル: EntityBase.cs プロジェクト: BenChung/CryMono
 /// <summary>
 /// Loads a light source to the specified slot, or to the next available slot.
 /// </summary>
 /// <param name="parameters">New params of the light source we wish to load</param>
 /// <param name="slot">Slot we want to load the light into, if -1 chooses the next available slot.</param>
 /// <returns>The slot where the light source was loaded, or -1 if loading failed.</returns>
 public int LoadLight(LightParams parameters, int slot = 1)
 {
     return(NativeEntityMethods.LoadLight(this.GetIEntity(), slot, parameters));
 }
コード例 #4
0
ファイル: EntityBase.cs プロジェクト: nathanpapke/CryMono
 /// <summary>
 /// Loads a light source to the specified slot, or to the next available slot.
 /// </summary>
 /// <param name="parameters">New params of the light source we wish to load</param>
 /// <param name="slot">Slot we want to load the light into, if -1 chooses the next available slot.</param>
 /// <returns>The slot where the light source was loaded, or -1 if loading failed.</returns>
 public int LoadLight(LightParams parameters, int slot = 1)
 {
     return NativeEntityMethods.LoadLight(this.GetIEntity(), slot, parameters);
 }
コード例 #5
0
ファイル: Attachment.cs プロジェクト: nathanpapke/CryMono
 public void SwitchToLightObject(ref LightParams lightParams)
 {
     NativeEntityMethods.BindAttachmentToLight(Handle, ref lightParams);
 }
コード例 #6
0
ファイル: Attachment.cs プロジェクト: yonder/CryMono
 public void SwitchToLightObject(ref LightParams lightParams)
 {
     NativeEntityMethods.BindAttachmentToLight(Handle, ref lightParams);
 }