示例#1
0
        public LocalPlayer(Game game) : base(game)
        {
            DisplayName = game.Username;
            SkinName    = game.Username;

            collisions    = new CollisionsComponent(game, this);
            Hacks         = new HacksComponent(game);
            physics       = new PhysicsComponent(game, this);
            sound         = new SoundComponent(game, this);
            interp        = new LocalInterpComponent(game, this);
            tilt          = new TiltComponent(game);
            physics.hacks = Hacks; physics.collisions = collisions;
        }
示例#2
0
        public LocalPlayer(Game game) : base(game)
        {
            DisplayName    = game.Username;
            SkinName       = game.Username;
            SkinIdentifier = "skin_255";

            collisions = new CollisionsComponent(game, this);
            Hacks      = new HacksComponent(game, this);
            physics    = new PhysicsComponent(game, this);
            input      = new InputComponent(game, this);
            sound      = new SoundComponent(game, this);
            interp     = new LocalInterpComponent(game, this);

            physics.hacks      = Hacks; input.Hacks = Hacks;
            physics.collisions = collisions;
            input.physics      = physics;
        }
示例#3
0
        public EntityItem(Game game) : base(game)
        {
            this.ItemId    = 1;
            this.ItemCount = 1;
            SetModel(ItemId.ToString());

            Model.Gravity        = 0.04f;
            Model.Drag           = new Vector3(0.95f, 0.98f, 0.95f);
            Model.GroundFriction = new Vector3(0.6f, 1f, 0.6f);
            Model.GroundBounce   = new Vector3(0f, 0.5f, 0f);

            Model.RecalcProperties(this);
            UpdateModelBounds();
            this.ModelScale = new Vector3(1 / 4f, 1 / 4f, 1 / 4f);
            interp          = new LocalInterpComponent(game, this);

            collisions         = new CollisionsComponent(game, this);
            physics            = new PhysicsComponent(game, this);
            physics.hacks      = hacks;
            physics.collisions = collisions;
        }