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;
 }
Exemple #3
0
		public virtual Suction SetMainFlowSuction(Suction fromSuccessor)
		{
			Suction toPredecessor;
			toPredecessor.CustomSuctionValue = SpeedOfMotor; //Force suction set by motor
			toPredecessor.SuctionType=SuctionType.CustomSuction;
			return toPredecessor;
		}
Exemple #4
0
			public override Suction SetMainFlowSuction(Suction fromSuccessor)
			{
				Suction toPredecessor;
				toPredecessor.CustomSuctionValue = 0; //Force suction set by motor
				toPredecessor.SuctionType = SuctionType.CustomSuction;
				return toPredecessor;
			}
Exemple #5
0
        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);
        }
Exemple #7
0
            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;
		}
Exemple #9
0
 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);
 }
Exemple #10
0
 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);
 }
Exemple #11
0
 public void CreateBloodSuction(Suction outgoingSuction)
 {
     if (TimeStepsLeft > 0)
     {
         outgoingSuction.SuctionType        = SuctionType.CustomSuction;
         outgoingSuction.CustomSuctionValue = 4;
     }
     else
     {
         outgoingSuction.SuctionType        = SuctionType.CustomSuction;
         outgoingSuction.CustomSuctionValue = 0;
     }
 }
Exemple #12
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);
        }
Exemple #13
0
		public void ReceivedSuction(Suction fromSuccessor)
		{
		}
Exemple #14
0
 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);
 }
Exemple #17
0
 public Suction ForwardUsedFlowSuction(Suction fromSuccessor)
 {
     return(fromSuccessor);
 }
		public Suction SetMainFlowSuction(Suction fromSuccessor)
		{
			return fromSuccessor;
		}
Exemple #19
0
 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;
		}
Exemple #22
0
 public void SetMainFlowSuction(Suction fromSuccessor, Suction toPredecessor)
 {
     toPredecessor.CopyValuesFrom(fromSuccessor);
 }
Exemple #23
0
 public void SetSenseFlowSuction(Suction toPredecessor)
 {
     toPredecessor.CustomSuctionValue = 0;
     toPredecessor.SuctionType        = SuctionType.CustomSuction;
 }
Exemple #24
0
 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;
 }
Exemple #25
0
 public void ReceivedSuction(Suction fromSuccessor)
 {
 }
Exemple #26
0
 public virtual void SetMainFlowSuction(Suction fromSuccessor, Suction toPredecessor)
 {
     toPredecessor.CustomSuctionValue = PumpSpeed;            //Force the pump
     toPredecessor.SuctionType        = SuctionType.CustomSuction;
 }
Exemple #27
0
 public void SetMainFlowSuction(Suction outgoingSuction)
 {
     outgoingSuction.CustomSuctionValue = 0;
     outgoingSuction.SuctionType        = SuctionType.SourceDependentSuction;
 }
Exemple #28
0
    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;
        }
    }
Exemple #29
0
 public Suction SetBloodFlowSuction(Suction incomingSuction)
 {
     return(incomingSuction);
 }
 public Suction SetMainFlowSuction(Suction fromSuccessor)
 {
     return(fromSuccessor);
 }
Exemple #31
0
 public virtual void SetMainFlowSuction(Suction fromSuccessor, Suction toPredecessor)
 {
     toPredecessor.CustomSuctionValue = SpeedOfMotor;             //Force suction set by motor
     toPredecessor.SuctionType        = SuctionType.CustomSuction;
 }