Ejemplo n.º 1
0
    public void DirectionInput(int tick, GameObject SourceInstance, IElectricityIO ComingFrom, IElectricityIO PassOn = null)
    {
        //Logger.Log(SourceInstance.ToString() + " < SourceInstance " + ComingFrom.ToString() + " < ComingFrom " + this.name + " < this " );
        if (connections.Count > 2)
        {
            ElectricityFunctions.DirectionInput(tick, SourceInstance, ComingFrom, this);
            FirstPresentInspector = FirstPresent;
        }
        else
        {
            int SourceInstanceID = SourceInstance.GetInstanceID();
            if (!(Upstream.ContainsKey(SourceInstanceID)))
            {
                Upstream [SourceInstanceID] = new HashSet <IElectricityIO> ();
            }
            if (!(Downstream.ContainsKey(SourceInstanceID)))
            {
                Downstream [SourceInstanceID] = new HashSet <IElectricityIO> ();
            }
            if (FirstPresent == 0)
            {
                //Logger.Log ("to It's been claimed", Category.Electrical);
                FirstPresent = SourceInstanceID;
                //Thiswire.FirstPresentInspector = SourceInstanceID;
            }

            if (ComingFrom != null)
            {
                Upstream [SourceInstanceID].Add(ComingFrom);
            }
            CameFromMemory = PassOn;
            SourceInstance.GetComponent <IProvidePower> ().DirectionWorkOnNextList.Add(this);
        }
    }
Ejemplo n.º 2
0
 public void DirectionInput(int tick, GameObject SourceInstance, IElectricityIO ComingFrom, IElectricityIO PassOn = null)
 {
     ElectricityFunctions.DirectionInput(tick, SourceInstance, ComingFrom, this);
     FirstPresentInspector = FirstPresent;
 }
Ejemplo n.º 3
0
 public void DirectionInput(int tick, GameObject SourceInstance, IElectricityIO ComingFrom, IElectricityIO PassOn = null)
 {
     //Logger.Log ("rfsdjhgkbedhgjasdgjyhsajkuhert");
     ElectricityFunctions.DirectionInput(tick, SourceInstance, ComingFrom, this);
     FirstPresentInspector = FirstPresent;
 }