示例#1
0
    protected override void Start()
    {
        base.Start();

        this.buttonText = GetComponentInChildren <Text>();

        this.toolkitMenu = GetComponentInParent <ToolkitMenu>();

        this.transition = Transition.None;

        this.activityColors = ActivityColorSet.PlainWhite;

        this.onClick.AddListener(() => OnClickToggleSelection());

        this.SetSelectedStatus(false);
    }
    void Awake()
    {
        if (craftingUI == null)
        {
            craftingUI          = this;
            focusAreaIndicators = new Dictionary <FocusAreaObject, GameObject>();
        }
        else
        {
            Destroy(this);
        }

        if (itemCrafter == null)
        {
            itemCrafter = new ItemCrafter();
        }

        craftingConversationBehavior = GetComponent <ConversationUi>();
        toolkitMenu = GetComponentInChildren <ToolkitMenu>();

        uiElementFactory = new CraftingUiElementFactory(this, toolkitMenu);
    }
示例#3
0
 public CraftingUiElementFactory(CraftingManager craftManager, ToolkitMenu toolkit)
 {
     this.craftingManager = craftManager;
     this.toolKitMenu     = toolkit;
 }