Esempio n. 1
0
 public override void Initialise()
 {
     camera          = new Camera();
     camera.position = position + eyePosition;
     base.Initialise();
     EntityCollider = BoundingBoxExtensions.FromSize(.6f, 1.8f, 0.6f);
     DoCalculateRay = true;
 }
Esempio n. 2
0
        public Player(ulong id) : base(id, Vector3.Zero)
        {
            base.eyePosition = new Vector3(0, 1.45f, 0);
            _coll            = BoundingBoxExtensions.FromSize(.6f, 1.8f, 0.6f);
            inventory        = new Inventory(9 * 4 + 4 + 1);      //Inventory storage + armor + offhand

            //init inventory
            for (int i = 0; i < inventory.items.Length; i++)
            {
                inventory.items[i].ItemCount = 1;
                inventory.items[i].ItemID    = (ushort)FastMath.FastClamp(i + 1, 0, 7);
            }
        }
 public EntityItemStack(ItemStack stack, Vector3 position, ulong id) : base(id, position)
 {
     base.Collidable     = false;
     base.EntityCollider = BoundingBoxExtensions.FromSize(0.25f, 0.25f, 0.25f);
 }