Пример #1
0
    public void Setup(ItemObject item, int index, HUDShop shopManager)
    {
        this.shopListIndex = index;
        this.shopManager   = shopManager;

        this.itemImage.sprite = item.icon;
    }
Пример #2
0
        public HumanController()
        {
            TargetLabel = Engine.Singleton.Labeler.NewTextLabel3D("Primitive", 0.04f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 0);
            ColLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.04f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2);
            ColLabel.Caption = "Kolizja";
            ColLabel.SetColor(ColourValue.Green, ColourValue.Green);
            ColLabel.SetPosition(0.4f, 0.1f);

            TalkBox = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.05f, 0.85f, 0.9f, 0.1f, new ColourValue(1, 1, 1), 1);
            TalkBox.IsVisible = false;

            TalkLabels = new List<TextLabel>();
            for (int i = 0; i < 8; i++)
            {
                TalkLabels.Add(Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.04f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2));
                TalkLabels[i].SetPosition(0.07f, 0.63f + i * 0.037f);
            }
            ValidReplies = new List<TalkReply>();

            HUDInventory = new HUDInventory();
            HUDContainer = new HUDContainer();
            HUDShop = new HUDShop();
            HUD = new HUD();
            HUDMenu = new HUDMenu();

            Mysz = new MOIS.MouseState_NativePtr();

            light.Type = Light.LightTypes.LT_POINT;
            light.Direction = new Vector3(0, -1, 0).NormalisedCopy;
            light.DiffuseColour = new ColourValue(0.2f, 0.2f, 0.8f);
            light.SpecularColour = new ColourValue(0.3f, 0.3f, 0.9f);
               // light.SetAttenuation(10.0f, 0, 5.0f, 10.0f);
            light.PowerScale = 1.0f;

            l1.Type = Light.LightTypes.LT_POINT;
            l1.DiffuseColour = new ColourValue(1,0,0);
            l1.SpecularColour = new ColourValue(1,0,0);
            l1.PowerScale = 1.0f;
            l1.Visible = false;

            l2.Type = Light.LightTypes.LT_POINT;
            l2.DiffuseColour = new ColourValue(0, 1, 0);
            l2.SpecularColour = new ColourValue(0, 1, 0);
            l2.PowerScale = 1.0f;
            l2.Visible = false;

            l3.Type = Light.LightTypes.LT_POINT;
            l3.DiffuseColour = new ColourValue(0, 0, 1);
            l3.SpecularColour = new ColourValue(0, 0, 1);
            l3.PowerScale = 1.0f;
            l3.Visible = false;

            l4.Type = Light.LightTypes.LT_POINT;
            l4.DiffuseColour = new ColourValue(1, 1, 0);
            l4.SpecularColour = new ColourValue(1, 1, 0);
            l4.PowerScale = 1.0f;
            l4.Visible = false;

            l5.Type = Light.LightTypes.LT_POINT;
            l5.DiffuseColour = new ColourValue(1, 1, 1);
            l5.SpecularColour = new ColourValue(1, 1, 1);
            l5.PowerScale = 1.0f;
            l5.Visible = false;

            l6.Type = Light.LightTypes.LT_POINT;
            l6.DiffuseColour = new ColourValue(1, 0, 1);
            l6.SpecularColour = new ColourValue(1, 0, 1);
            l6.PowerScale = 1.0f;
            l6.Visible = false;

            l7.Type = Light.LightTypes.LT_POINT;
            l7.DiffuseColour = new ColourValue(0, 1, 1);
            l7.SpecularColour = new ColourValue(0, 1, 1);
            l7.PowerScale = 1.0f;
            l7.Visible = false;
        }