Exemple #1
0
        //Vector3 rawRotation;//, rotation;

        public Tool(Player parent, GameInput gameInput)
        {
            Parent = parent;

            this.gameInput = gameInput;

            raycastCallback = new RaycastCallback(mRaycastCallback);

            slot = getSlot();

            icon = new GuiElement(this.parent.hud);
            icon.setSizeRel(new Vector2(256, 128));

            iconPos       = new Vector2(-0.8f, 0.8f - slot * iconDist);
            smoothIconPos = iconPos;
            icon.Position = smoothIconPos;

            icon.setMaterial("hud\\blank_icon.xmf");

            createWeaponModel();
        }