示例#1
0
 public LynxDeseignCanvas()
 {
     InitializeComponent();
     adp        = new ActionDrop(DeseignCanvas, null, DataDrop);//允许放置
     adp.Enable = true;
     adp.EnableDrop();
 }
示例#2
0
    void DrawInventory(Location currentLocation)
    {
        GUI.Label(new Rect(posGUI.x, posGUI.y, fieldWidth, fieldHeight), "Items : ");
        posGUI.y += fieldHeight;

        List <Item> inventory = currentPlayer.inventory;

        for (int i = 0; i < inventory.Count; i++)
        {
            Item item = inventory[i];
            GUI.Label(new Rect(posGUI.x, posGUI.y, fieldWidth, fieldHeight), item.ToShortString());

            if (currentLocation != timeMachine)
            {
                if (GUI.Button(new Rect(posGUI.x + 140, posGUI.y, 60, fieldHeight), "Drop"))
                {
                    ActionDrop actionDrop = new ActionDrop(currentTime, item, i);
                    AddAction(actionDrop);
                }

                if (item.useTimeline)
                {
                    if (GUI.Button(new Rect(posGUI.x + 80, posGUI.y, 60, fieldHeight), "Age"))
                    {
                        ActionCheckAge actionCheckAge = new ActionCheckAge(currentTime, item, i);
                        AddAction(actionCheckAge);
                    }
                }
            }

            posGUI.y += fieldHeight;
        }
    }