Ejemplo n.º 1
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     EditorGUILayout.Space();
     if (targets.Length == 1)
     {
         ElectricLine obj = target as ElectricLine;
         EditorGUILayout.HelpBox($"Voltage:\t{obj.StartingVoltage} V{Environment.NewLine}Current:\t{obj.Current.Magnitude} A{Environment.NewLine}Phase:\t{obj.Current.Phase * (Math.PI / 180.0)}", MessageType.Info);
     }
 }
Ejemplo n.º 2
0
 void Start()
 {
     _igoreList    = new List <int>();
     _lineRenderer = GetComponent <LineRenderer>();
     _linkedPoint  = new List <Vector2>();
     _line         = GetComponent <ElectricLine>();
     _players      = new Transform[2];
     p             = FindObjectsOfType <Player>();
     _retrys       = FindObjectsOfType <Retry>();
     _players[0]   = p[0].transform;
     _players[1]   = p[1].transform;
 }