Ejemplo n.º 1
0
    private static void MakeTransmitSatelite(Satelite satelite)
    {
        satelite.name = "Transmit Satelite";

        // Add Transmit script
        SignalTransmitter transmitter = satelite.gameObject.AddComponent <SignalTransmitter>();

        transmitter.broadcastRadius = Factory.broadcastRadius;
        transmitter.signalType      = SignalType.Internet;
        satelite.gameObject.AddComponent <TransmitterConnector>();

        // Add cone of shame
        ConeFactory coneFactory = new ConeFactory();

        coneFactory.numVertices  = 20;
        coneFactory.radiusTop    = 0f;
        coneFactory.radiusBottom = Mathf.Tan(Factory.broadcastRadius) / 2;
        coneFactory.length       = 1f;
        GameObject cone = coneFactory.ManufactureCone();

        // Set parent, position and rotation
        cone.transform.parent        = satelite.transform;
        cone.transform.localPosition = Vector3.zero;
        cone.transform.localRotation = Quaternion.Euler(new Vector3(90, 0, 0));
        // Set Material
        cone.GetComponent <MeshRenderer>().sharedMaterial = Factory.coneMaterial;
        // Hide cone initially
        cone.GetComponent <Renderer>().enabled = false;
    }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialized loopback test
        /// </summary>
        public LoopbackTest()
        {
            _transmitter = new SignalTransmitter();
            _receiver    = new SignalReceiver();

            _receiver.Message += new EventHandler <SignalReceiverEventArgs>(OnNewMessage);
        }
Ejemplo n.º 3
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Transmitter = new SignalTransmitter();
            Receiver    = new SignalReceiver();

            Application.Run(new MainWin());
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes WinLIRC.NET transmitter tests
 /// </summary>
 public TransmitterTest()
 {
     _transmitter = new SignalTransmitter();
 }
Ejemplo n.º 5
0
 private void RemoveSignalTransmitter(SignalTransmitter st)
 {
     signalTransmitters.Remove(st);
 }
Ejemplo n.º 6
0
 private void AddSignalTransmitter(SignalTransmitter st)
 {
     signalTransmitters.Add(st);
     st.SetPopuplation(this);
 }