Convert to C#,I don't know how to convert this

I tried throughout the whole day and i really don’t know how to make this C#
the name of the script is CameraRelatveControl.js

       // stick is used to rotate the camera around the character.
// A quick double-tap on the right joystick will make the 
// character jump. 
//////////////////////////////////////////////////////////////

#pragma strict

// This script must be attached to a GameObject that has a CharacterController
@script RequireComponent( CharacterController )

var moveJoystick : Joystick;
var rotateJoystick : Joystick;

var cameraPivot : Transform;						// The transform used for camera rotation
var cameraTransform : Transform;					// The actual transform of the camera

var speed : float = 5;								// Ground speed				
var rotationSpeed : Vector2 = Vector2( 50, 25 );	// Camera rotation speed for each axis








function OnEndGame()
{
	// Disable joystick when the game ends	
	moveJoystick.Disable();
	rotateJoystick.Disable();
	
	// Don't allow any more control changes when the game ends
	this.enabled = false;
}

function Update()
{

	var movement = cameraTransform.TransformDirection( Vector3( moveJoystick.position.x, 0, moveJoystick.position.y ) );
		// We only want the camera-space horizontal direction
	movement.y = 0;
	movement.Normalize(); // Adjust magnitude after ignoring vertical movement
	
	// Let's use the largest component of the joystick position for the speed.
	var absJoyPos = Vector2( Mathf.Abs( moveJoystick.position.x ), Mathf.Abs( moveJoystick.position.y ) );
	movement *= speed * ( ( absJoyPos.x > absJoyPos.y ) ? absJoyPos.x : absJoyPos.y );
	
	
		
	
	if(movement.x > 0){
	print("right");
	
	}
	
	if(movement.x < 0){
	print("left");
	
	}
	
		if(movement.z > 0){
				print("up");
				
			}
			
	if(movement.z < 0){
	print("backward");
	
	}
	
	
	// Scale joystick input with rotation speed
	var camRotation = rotateJoystick.position;
	camRotation.x *= rotationSpeed.x;
	camRotation.y *= rotationSpeed.y;
	camRotation *= Time.deltaTime;
	
	// Rotate around the character horizontally in world, but use local space
	// for vertical rotation
	cameraPivot.Rotate( 0, camRotation.x, 0, Space.World );
	cameraPivot.Rotate( -camRotation.y, 0, 0 );
}

please help

Without the other classes I cannot test this, but something like this (again, untested) :

using UnityEngine;
using System.Collections;

[RequireComponent (typeof (CharacterController))]

public class CameraRelativeControl : MonoBehaviour 
{

	Joystick moveJoystick;
	Joystick rotateJoystick;
	
	Transform cameraPivot; 						// The transform used for camera rotation
	Transform cameraTransform; 					// The actual transform of the camera
	
	float speed = 5.0f; 						// Ground speed          
	Vector2 rotationSpeed = new Vector2( 50, 25 ); 	// Camera rotation speed for each axis
	
	
	void Update()
	{
	    Vector3 movement = cameraTransform.TransformDirection( new Vector3( moveJoystick.position.x, 0, moveJoystick.position.y ) );
		
	    // We only want the camera-space horizontal direction
	    movement.y = 0;
	    movement.Normalize(); // Adjust magnitude after ignoring vertical movement
	
	    // Let's use the largest component of the joystick position for the speed.
	    Vector2 absJoyPos = new Vector2( Mathf.Abs( moveJoystick.position.x ), Mathf.Abs( moveJoystick.position.y ) );
		
		// * not sure about this line *
	    movement *= speed * ( ( absJoyPos.x > absJoyPos.y ) ? absJoyPos.x : absJoyPos.y );
	
	
	    if(movement.x > 0){
			print("right");
	    }
	
	    if(movement.x < 0){
		print("left");
	    }
	
		if(movement.z > 0){
			print("up");
		}
	
	    if(movement.z < 0){
			print("backward");
	    }
	
	
	    // Scale joystick input with rotation speed
	    var camRotation = rotateJoystick.position;
	    camRotation.x *= rotationSpeed.x;
	    camRotation.y *= rotationSpeed.y;
	    camRotation *= Time.deltaTime;
	
	    // Rotate around the character horizontally in world, but use local space
	    // for vertical rotation
	    cameraPivot.Rotate( 0, camRotation.x, 0, Space.World );
	    cameraPivot.Rotate( -camRotation.y, 0, 0 );
	}
	
	
	void OnEndGame()
	{
	    // Disable joystick when the game ends 
	    moveJoystick.Disable();
	    rotateJoystick.Disable();
	
	    // Don't allow any more control changes when the game ends
	    this.enabled = false;
	}
}