Exemplo n.º 1
0
 public void StopBeingTranparent(NodeRemoveEvent e, TankDeadStateVisibleActivatedNode tank, [JoinByTank] ICollection <TransparnetRendererNode> renderers)
 {
     foreach (TransparnetRendererNode node in renderers)
     {
         node.Entity.RemoveComponent <TransparentComponent>();
     }
 }
Exemplo n.º 2
0
 public void StartBeingTranparent(UpdateEvent e, TankDeadStateVisibleActivatedNode tank, [JoinByTank] ICollection <OpaqueRendererNode> renderers)
 {
     if (Date.Now.AddSeconds(0.5f) >= tank.tankDeadState.EndDate)
     {
         foreach (OpaqueRendererNode node in renderers)
         {
             node.Entity.AddComponent <TransparentComponent>();
             base.ScheduleEvent(new SetTransparencyTransitionDataEvent(ClientGraphicsConstants.OPAQUE_ALPHA, ClientGraphicsConstants.TRANSPARENT_ALPHA, 0.5f), node);
         }
     }
 }
Exemplo n.º 3
0
        public void FadeTemperature(UpdateEvent e, TankDeadStateVisibleActivatedNode tank, [JoinByTank] ICollection <RendererNode> renderers)
        {
            float time = (float)((tank.tankDeadState.EndDate - Date.Now) / (tank.tankDeadState.EndDate - tank.tankDeadStateTexture.FadeStart));

            if (time != tank.tankDeadStateTexture.LastFade)
            {
                tank.tankDeadStateTexture.LastFade = time;
                Vector4 vector = new Vector4(tank.tankDeadStateTexture.HeatEmission.Evaluate(time), 0f, tank.tankDeadStateTexture.WhiteToHeatTexture.Evaluate(time), tank.tankDeadStateTexture.PaintTextureToWhiteHeat.Evaluate(time));
                foreach (RendererNode node in renderers)
                {
                    ClientGraphicsUtil.UpdateVector(node.baseRenderer.Renderer, ClientGraphicsConstants.TEMPERATURE, vector);
                }
            }
        }