public bool OnBlockInteractStep(float secondsUsed, IPlayer byPlayer, EnumFruitPressSection section) { if (section != EnumFruitPressSection.Screw) { return(false); } if (mashStack != null) { RunningAnimation anim = animUtil.animator.GetAnimationState("compress"); if (anim != null) { udpateSqueezeRel(anim); } } return(CompressAnimActive && secondsUsed < 4f); }
// What needs to happen while squeezing: // 0..3 sec: Linearly squeeze mash mesh, stay squeezed // 0..3 sec: Spawn juice particles all around // 1..6 sec: Grow juice quad, spawn particles at the spout // 6..12 sec: Shrink juice quad // 1..12 sec: Add liquid to bucket public bool OnBlockInteractStart(IPlayer byPlayer, BlockSelection blockSel, EnumFruitPressSection section, bool firstEvent) { firstEvent |= Api.Side == EnumAppSide.Server; if (section == EnumFruitPressSection.MashContainer) { return(InteractMashContainer(byPlayer, blockSel)); } if (section == EnumFruitPressSection.Ground) { return(InteractGround(byPlayer, blockSel)); } if (section == EnumFruitPressSection.Screw) { return(InteractScrew(byPlayer, blockSel, firstEvent)); } return(false); }