public virtual Suction SetMainFlowSuction(Suction fromSuccessor) { Suction toPredecessor; toPredecessor.CustomSuctionValue= PumpSpeed; //Force the pump toPredecessor.SuctionType=SuctionType.CustomSuction; return toPredecessor; }
public void SetDialyzingFluidFlowSuction(Suction outgoingSuction, Suction incomingSuction) { //Assume incomingSuction.SuctionType == SuctionType.CustomSuction; IncomingSuctionRateOnDialyzingFluidSide = incomingSuction.CustomSuctionValue; outgoingSuction.CustomSuctionValue = 0; outgoingSuction.SuctionType = SuctionType.SourceDependentSuction; }
public virtual Suction SetMainFlowSuction(Suction fromSuccessor) { Suction toPredecessor; toPredecessor.CustomSuctionValue = SpeedOfMotor; //Force suction set by motor toPredecessor.SuctionType=SuctionType.CustomSuction; return toPredecessor; }
public override Suction SetMainFlowSuction(Suction fromSuccessor) { Suction toPredecessor; toPredecessor.CustomSuctionValue = 0; //Force suction set by motor toPredecessor.SuctionType = SuctionType.CustomSuction; return toPredecessor; }
public virtual Suction SetMainFlowSuction(Suction fromSuccessor) { Suction toPredecessor; toPredecessor.CustomSuctionValue = SpeedOfMotor; //Force suction set by motor toPredecessor.SuctionType = SuctionType.CustomSuction; return(toPredecessor); }
public virtual Suction SetMainFlowSuction(Suction fromSuccessor) { Suction toPredecessor; toPredecessor.CustomSuctionValue = PumpSpeed; //Force the pump toPredecessor.SuctionType = SuctionType.CustomSuction; return(toPredecessor); }
public override Suction SetMainFlowSuction(Suction fromSuccessor) { Suction toPredecessor; toPredecessor.SuctionType = SuctionType.CustomSuction; toPredecessor.CustomSuctionValue = 0; return(toPredecessor); }
public Suction SetDialyzingFluidFlowSuction(Suction incomingSuction) { //Assume incomingSuction.SuctionType == SuctionType.CustomSuction; Suction outgoingSuction; IncomingSuctionRateOnDialyzingFluidSide = incomingSuction.CustomSuctionValue; outgoingSuction.CustomSuctionValue = 0; outgoingSuction.SuctionType = SuctionType.SourceDependentSuction; return outgoingSuction; }
public Trashbot(PlayerIndex player) { this.player = player; texture = Content.Load <Texture2D>("trashbot"); scaledTexture = new Dimension(texture.Width * scale, texture.Height * scale); center = new Vector2(texture.Width / 2, texture.Height / 2); suckAction = new Suction(); setInitialPosition(); previousState = GamePad.GetState(player); }
public Trashbot(PlayerIndex player) { this.player = player; texture = Content.Load<Texture2D>("trashbot"); scaledTexture = new Dimension(texture.Width * scale, texture.Height * scale); center = new Vector2(texture.Width / 2, texture.Height / 2); suckAction = new Suction(); setInitialPosition(); previousState = GamePad.GetState(player); }
public void CreateBloodSuction(Suction outgoingSuction) { if (TimeStepsLeft > 0) { outgoingSuction.SuctionType = SuctionType.CustomSuction; outgoingSuction.CustomSuctionValue = 4; } else { outgoingSuction.SuctionType = SuctionType.CustomSuction; outgoingSuction.CustomSuctionValue = 0; } }
public virtual Suction SetMainFlowSuction(Suction fromSuccessor) { Suction toPredecessor; toPredecessor.SuctionType = SuctionType.CustomSuction; if (fromSuccessor.SuctionType == SuctionType.SourceDependentSuction) { toPredecessor.CustomSuctionValue = PumpSpeed; } else { toPredecessor.CustomSuctionValue = fromSuccessor.CustomSuctionValue + PumpSpeed; } return(toPredecessor); }
public void ReceivedSuction(Suction fromSuccessor) { }
public void SetConcentrateFlowSuction(Suction outgoingSuction) { outgoingSuction.CustomSuctionValue = 1; outgoingSuction.SuctionType = SuctionType.CustomSuction; }
public void ForwardUsedFlowSuction(Suction fromSuccessor, Suction toPredecessor) { toPredecessor.CopyValuesFrom(fromSuccessor); }
public void SetBloodFlowSuction(Suction outgoingSuction, Suction incomingSuction) { outgoingSuction.CopyValuesFrom(incomingSuction); }
public Suction ForwardUsedFlowSuction(Suction fromSuccessor) { return(fromSuccessor); }
public Suction SetMainFlowSuction(Suction fromSuccessor) { return fromSuccessor; }
public override void SetMainFlowSuction(Suction fromSuccessor, Suction toPredecessor) { toPredecessor.CustomSuctionValue = 0; toPredecessor.SuctionType = SuctionType.CustomSuction; }
public Suction ForwardUsedFlowSuction(Suction fromSuccessor) { return fromSuccessor; }
public Suction SetBloodFlowSuction(Suction incomingSuction) { return incomingSuction; }
public void SetMainFlowSuction(Suction fromSuccessor, Suction toPredecessor) { toPredecessor.CopyValuesFrom(fromSuccessor); }
public void SetSenseFlowSuction(Suction toPredecessor) { toPredecessor.CustomSuctionValue = 0; toPredecessor.SuctionType = SuctionType.CustomSuction; }
public void CreateDialyzingFluidSuction(Suction outgoingSuction) { //Hard code delivered quantity 2 and suction 3. We simulate if Ultra Filtration works with Dialyzer. outgoingSuction.SuctionType = SuctionType.CustomSuction; outgoingSuction.CustomSuctionValue = 3; }
public virtual void SetMainFlowSuction(Suction fromSuccessor, Suction toPredecessor) { toPredecessor.CustomSuctionValue = PumpSpeed; //Force the pump toPredecessor.SuctionType = SuctionType.CustomSuction; }
public void SetMainFlowSuction(Suction outgoingSuction) { outgoingSuction.CustomSuctionValue = 0; outgoingSuction.SuctionType = SuctionType.SourceDependentSuction; }
void Start() { _lineRenderer = new GameObject("Leg Factory Line Renderer").AddComponent <LineRenderer>(); _lineRenderer.startColor = Color.white; _lineRenderer.endColor = Color.white; _lineRenderer.positionCount = TubeLength; _lineRenderer.widthCurve = Settings.ScaleCurve; _lineRenderer.widthMultiplier = Settings.WidthMultiplier; _lineRenderer.material = LineRendererMaterial; _lineRenderer.material.color = Settings.VaccumSegmentLineColor; _lineRenderer.sortingLayerID = SortingLayer.NameToID("BehindVaccum"); _lineRenderer.transform.position = new Vector3(0, 0f, 0f); //spawn initial leg attached to leg factory _rigidbody2D = gameObject.GetComponent <Rigidbody2D>(); _rbs = new List <Rigidbody2D>(TubeLength); var first = LegPool.Spawn(); first.GetComponent <SpriteRenderer>().color = Settings.VaccumSegmentTint; SpringJoint2D prevJnt; Rigidbody2D prevRb; CreateNewSegment(0f, first, _rigidbody2D, out prevJnt, out prevRb); _rbs.Add(prevRb); for (int i = 1; i < TubeLength; i++) //spawn rest of legs { Tube currentSeg; SpringJoint2D currentJnt; Rigidbody2D currentRb; float normIndex = (float)i / (TubeLength - 1); GameObject current; if (i != TubeLength - 1) { current = LegPool.Spawn(); current.GetComponent <SpriteRenderer>().color = Settings.VaccumSegmentTint; } else //if the last segment, spawn the sucker { current = Instantiate(Settings.VaccumTipPrefab); current.name = $" {gameObject.name}'s Sucker"; current.GetComponent <SpriteRenderer>().color = Settings.VaccumTipTint; _suction = current.GetComponent <Suction>(); if (_suction == null) { Debug.LogError("_sucker not assigned, the prefab is probably not configured properly!"); } } CreateNewSegment(normIndex, current, prevRb, out currentJnt, out currentRb); _rbs.Add(currentRb); prevJnt = currentJnt; prevRb = currentRb; } }
public Suction SetBloodFlowSuction(Suction incomingSuction) { return(incomingSuction); }
public Suction SetMainFlowSuction(Suction fromSuccessor) { return(fromSuccessor); }
public virtual void SetMainFlowSuction(Suction fromSuccessor, Suction toPredecessor) { toPredecessor.CustomSuctionValue = SpeedOfMotor; //Force suction set by motor toPredecessor.SuctionType = SuctionType.CustomSuction; }