public LocalPlayer(Game game) : base(game)
        {
            DisplayName = game.Username;
            SkinName    = game.Username;

            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);
            tilt       = new TiltComponent(game);

            physics.hacks      = Hacks; input.Hacks = Hacks;
            physics.collisions = collisions;
            input.physics      = physics;
        }
Exemple #2
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;
        }