Ejemplo n.º 1
0
        public bool Start(InteractionEvent interactionEvent, InteractionReference reference)
        {
            if (interactionEvent.Source is IGameObjectProvider provider)
            {
                SubstanceContainer container = provider.GameObject.GetComponent <SubstanceContainer>();
                if (container != null)
                {
                    container.AddSubstance(Substance.Substance, Substance.Moles);
                    container.MarkDirty();
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
        public bool Start(InteractionEvent interactionEvent, InteractionReference reference)
        {
            if (interactionEvent.Source is IGameObjectProvider provider)
            {
                SubstanceContainer container = provider.GameObject.GetComponent <SubstanceContainer>();
                if (container != null)
                {
                    var targetContainer = interactionEvent.Target.GetComponent <SubstanceContainer>();
                    container.TransferVolume(targetContainer, 25);
                    container.MarkDirty();
                    targetContainer.MarkDirty();
                }
            }

            return(false);
        }