Beispiel #1
0
 public override void DirectionInput(GameObject SourceInstance, ElectricalOIinheritance ComingFrom, CableLine PassOn = null)
 {
     InputOutputFunctions.DirectionInput(SourceInstance, ComingFrom, this);
     if (PassOn == null)
     {
         if (RelatedLine != null)
         {
             //if (RelatedLine.TheEnd == this.GetComponent<ElectricalOIinheritance> ()) {
             //	//Logger.Log ("looc");
             //} else if (RelatedLine.TheStart == this.GetComponent<ElectricalOIinheritance> ()) {
             //	//Logger.Log ("cool");
             //} else {
             //	//Logger.Log ("hELP{!!!");
             //}
         }
         else
         {
             if (!(Data.connections.Count > 2))
             {
                 RelatedLine = new CableLine();
                 if (RelatedLine == null)
                 {
                     Logger.Log("DirectionInput: RelatedLine is null.", Category.Power);
                 }
                 RelatedLine.InitialGenerator = SourceInstance;
                 RelatedLine.TheStart         = this;
                 lineExplore(RelatedLine, SourceInstance);
                 if (RelatedLine.TheEnd == null)
                 {
                     RelatedLine = null;
                 }
             }
         }
     }
 }
 ///// <summary>
 /////  Sets the upstream
 ///// </summary>
 public virtual void DirectionInput(ElectricalOIinheritance SourceInstance, IntrinsicElectronicData ComingFrom, CableLine PassOn = null)
 {
     if (Logall)
     {
         Logger.Log("this > " + this + "DirectionInput SourceInstance > " + SourceInstance + " ComingFrom > " + ComingFrom + "  PassOn > " + PassOn, Category.Electrical);
     }
     InputOutputFunctions.DirectionInput(SourceInstance, ComingFrom, InData);
 }
Beispiel #3
0
 /// <summary>
 ///  Sets the upstream
 /// </summary>
 public virtual void DirectionInput(GameObject SourceInstance, ElectricalOIinheritance ComingFrom, CableLine PassOn = null)
 {
     if (Logall)
     {
         Logger.Log("this > " + this + "DirectionInput SourceInstance > " + SourceInstance + " ComingFrom > " + ComingFrom + "  PassOn > " + PassOn, Category.Electrical);
     }
     InputOutputFunctions.DirectionInput(SourceInstance, ComingFrom, this);
 }
 /// <summary>
 ///  Sets the upstream
 /// </summary>
 public virtual void DirectionInput(ElectricalOIinheritance SourceInstance, IntrinsicElectronicData ComingFrom, CableLine PassOn = null)
 {
     if (Present != null)
     {
         Present.DirectionInput(SourceInstance, ComingFrom);
     }
     else
     {
         InputOutputFunctions.DirectionInput(SourceInstance, ComingFrom, this);
     }
 }
Beispiel #5
0
 public override void DirectionInput(GameObject SourceInstance, IElectricityIO ComingFrom, CableLine PassOn = null)
 {
     InputOutputFunctions.DirectionInput(SourceInstance, ComingFrom, this);
     if (PassOn == null)
     {
         if (RelatedLine != null)
         {
             if (RelatedLine.TheEnd == this.GetComponent <IElectricityIO> ())
             {
                 //Logger.Log ("looc");
             }
             else if (RelatedLine.TheStart == this.GetComponent <IElectricityIO> ())
             {
                 //Logger.Log ("cool");
             }
             else
             {
                 //Logger.Log ("hELP{!!!");
             }
         }
         else
         {
             if (!(Data.connections.Count > 2))
             {
                 RelatedLine = new CableLine();
                 if (RelatedLine == null)
                 {
                     Logger.Log("HE:LP:::::::::::::::::::niniinininininin");
                 }
                 RelatedLine.InitialGenerator = SourceInstance;
                 RelatedLine.TheStart         = this;
                 lineExplore(RelatedLine, SourceInstance);
                 if (RelatedLine.TheEnd == null)
                 {
                     RelatedLine = null;
                 }
             }
         }
     }
 }
Beispiel #6
0
 public void DirectionInput(int tick, GameObject SourceInstance, IElectricityIO ComingFrom, IElectricityIO PassOn = null)
 {
     InputOutputFunctions.DirectionInput(tick, SourceInstance, ComingFrom, this);
 }
Beispiel #7
0
 public virtual void DirectionInput(GameObject SourceInstance, IElectricityIO ComingFrom, CableLine PassOn = null)
 {
     InputOutputFunctions.DirectionInput(SourceInstance, ComingFrom, this);
 }