Esempio n. 1
0
        public void SetMaster(ISetMultitoolMaster Imaster)
        {
            var boiler = (Imaster as Component)?.gameObject.GetComponent <ReactorBoiler>();

            if (boiler != null)
            {
                ReactorBoiler = boiler;
            }
            var Turbine = (Imaster as Component)?.gameObject.GetComponent <ReactorTurbine>();

            if (Turbine != null)
            {
                ReactorTurbine = Turbine;
            }
        }
Esempio n. 2
0
 private void SetMaster(IMultitoolMasterable master)
 {
     if (master is ReactorBoiler boiler)
     {
         linkedMaster  = master;
         ReactorBoiler = boiler;
     }
     else if (master is ReactorTurbine turbine)
     {
         linkedMaster   = master;
         ReactorTurbine = turbine;
     }
     else
     {
         linkedMaster   = null;
         ReactorBoiler  = null;
         ReactorTurbine = null;
     }
 }