示例#1
0
 public override void GetBlockInfo(IPlayer forPlayer, StringBuilder dsc)
 {
     base.GetBlockInfo(forPlayer, dsc);
     dsc.AppendLine("On:" + isOn.ToString());
     dsc.AppendLine("Volts:" + MaxVolts.ToString() + "V" + " Amps:" + maxAmps.ToString());
     dsc.AppendLine("Power:" + Capacitor.ToString() + "/" + Capacitance.ToString());
     dsc.AppendLine("IN:" + inputConnections.Count.ToString() + " OUT:" + outputConnections.Count.ToString());
 }
示例#2
0
    public override void GetProperties()
    {
        GameObject           propertiesContainer = GameObject.Find("PropertiesWindowContainer");
        EditObjectProperties script = propertiesContainer.GetComponent <EditObjectProperties>();

        script.AddString("ComponentNameLabel", _name, SetName);
        script.AddNumeric("CapacitancePropertyLabel", Capacitance.ToString(), Capacitance.GetType().ToString(), SetCapacitance, false);
    }