Example #1
0
		static void Main()
		{
            ControlReceiver controlReceiver = new ControlReceiver();
            VideoCapture videoCapture = new VideoCapture();

            Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			if (!IsOnlyInstance())
			{
				return;
			}
			
			try
			{
                ThreadPool.QueueUserWorkItem(o =>
                    {
                        videoCapture.Configure(0, "temp.wmv");
                        controlReceiver.Initialize(videoCapture);
                    });
                Application.Run(new CustomApplicationContext());
            }
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message, "Program Terminated Unexpectedly",
					MessageBoxButtons.OK, MessageBoxIcon.Error);
			}
		}
Example #2
0
 //-------------------------------------Main Function----------------------------------------
 void Awake()
 {
     cr = GameObject.Find("ControlReceiver").GetComponent <ControlReceiver>();
     sp = GetComponent <Net_SyncPlayer>();
     pm = GetComponent <PlayerMove2D>();
     cl = GetComponent <Controller2D>();
 }
Example #3
0
    void Start()
    {
        controller = GetComponent <Controller2D>();
        cr         = GetComponent <Player>().cr;

        gravity         = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2);
        maxJumpVelocity = Mathf.Abs(gravity) * timeToJumpApex;
        minJumpVelocity = Mathf.Sqrt(2 * Mathf.Abs(gravity) * minJumpHeight);
    }