Ejemplo n.º 1
0
        private ItemStack[] getMatchingStacks(WorldInteraction wi, BlockSelection blockSelection, EntitySelection entitySelection)
        {
            BlockEntityBloomery beb = api.World.BlockAccessor.GetBlockEntity(blockSelection.Position) as BlockEntityBloomery;

            if (beb == null || wi.Itemstacks.Length == 0)
            {
                return(null);
            }

            List <ItemStack> matchStacks = new List <ItemStack>();

            foreach (ItemStack stack in wi.Itemstacks)
            {
                if (beb.CanAdd(stack))
                {
                    matchStacks.Add(stack);
                }
            }

            return(matchStacks.ToArray());
        }
 static void Postfix(ref WorldInteraction wi, EnumMouseButton __state)
 {
     // Restore original state
     wi.MouseButton = __state;
 }
Ejemplo n.º 3
0
 void OnEnable()
 {
     instance = this;
 }
Ejemplo n.º 4
0
 void Awake()
 {
     instance = this;
     hitMask = Settings.Instance().worldInteractionMask;
 }
Ejemplo n.º 5
0
    protected GameObject interactText;                  // Shows message to start interaction

    void Awake()
    {
        playerTransform  = GameObject.FindGameObjectWithTag("Player").transform;
        worldInteraction = playerTransform.GetComponent <WorldInteraction>();
        interactText     = transform.Find("InteractText").gameObject;
    }
Ejemplo n.º 6
0
 private void Awake()
 {
     levelEventHandler = FindObjectOfType <GameManager>();
     worldInteraction  = GetComponent <WorldInteraction>();
     leftClickInWorld  = GetComponent <LeftClickInWorld>();
 }