public void DrawShadows() { if (ShadowMode == EntityShadow.None) { return; } ShadowComponent.boundShadowTex = false; IGraphicsApi gfx = game.Graphics; gfx.AlphaArgBlend = true; gfx.DepthWrite = false; gfx.AlphaBlending = true; gfx.Texturing = true; gfx.SetBatchFormat(VertexFormat.P3fT2fC4b); ShadowComponent.Draw(game, List[SelfID]); if (ShadowMode == EntityShadow.CircleAll) { DrawOtherShadows(); } gfx.AlphaArgBlend = false; gfx.DepthWrite = true; gfx.AlphaBlending = false; gfx.Texturing = false; }
public Player(Game game) : base(game) { this.game = game; StepSize = 0.5f; SkinType = game.DefaultPlayerSkinType; anim = new AnimatedComponent(game, this); shadow = new ShadowComponent(game, this); SetModel("humanoid"); }
public Player( Game game ) : base(game) { this.game = game; StepSize = 0.5f; SkinType = game.DefaultPlayerSkinType; anim = new AnimatedComponent( game, this ); shadow = new ShadowComponent( game, this ); SetModel( "humanoid" ); }
void DrawOtherShadows() { for (int i = 0; i < SelfID; i++) { if (List[i] == null) { continue; } Player p = List[i] as Player; if (p != null) { ShadowComponent.Draw(game, p); } } }
public void DrawShadows() { if (ShadowMode == EntityShadow.None) { return; } ShadowComponent.boundShadowTex = false; IGraphicsApi gfx = game.Graphics; gfx.AlphaArgBlend = true; gfx.DepthWrite = false; gfx.AlphaBlending = true; gfx.Texturing = true; gfx.SetBatchFormat(VertexFormat.P3fT2fC4b); ShadowComponent.Draw(game, List[SelfID]); if (ShadowMode == EntityShadow.CircleAll) { for (int i = 0; i < SelfID; i++) { if (List[i] == null) { continue; } Player p = List[i] as Player; if (p != null) { ShadowComponent.Draw(game, p); } } } gfx.AlphaArgBlend = false; gfx.DepthWrite = true; gfx.AlphaBlending = false; gfx.Texturing = false; }
public Player(Game game) : base(game) { StepSize = 0.5f; shadow = new ShadowComponent(game, this); SetModel("humanoid"); }