Exemple #1
0
        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;
        }
Exemple #2
0
 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" );
 }
Exemple #4
0
 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);
         }
     }
 }
Exemple #5
0
        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;
        }
Exemple #6
0
 public Player(Game game) : base(game)
 {
     StepSize = 0.5f;
     shadow   = new ShadowComponent(game, this);
     SetModel("humanoid");
 }