convert c# to Javascript(bump all of you-Closed)

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
nite4000
Forum Contributor
Posts: 209
Joined: Sun Apr 12, 2009 11:31 am

convert c# to Javascript(bump all of you-Closed)

Post by nite4000 »

I have a few lines of code here that I need help with converting from c# to JavaScript

any help would be great

Code: Select all

GameObject.Find("GameManager").GetComponent<GameManager>().tokenCount++;
tokenCount is a variable in the gamemanager script which is JS but this is c# code I need to make this JS

this line here is c# as well in the GameManager c# file but when I try to make it JS it don't work

Code: Select all

int gameTime = (int)startTime;
as well as this line is from gamemanager as well which I need to make it JS

Code: Select all

			Rect winScreenRect = new Rect(Screen.width/2 - (Screen.width *.5f/2),Screen.height/2 - (Screen.height *.5f/2),Screen.width *.5f,Screen.height *.5f);

help would be great with this
Last edited by nite4000 on Sun Nov 09, 2014 6:35 pm, edited 1 time in total.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: convert c# to Javascript

Post by requinix »

You've given WAY too little information for us to have even the slightest clue what to do.

What's GameObject? What does .Find() do? What does GetComponent<>() do? What's the tokenCount? Where are all those things located in Javascript?
What is gameTime? Where is it used? Where did startTime come from? Are either of those defined in the Javascript? Where and when?
Screen information. Does that correlate to Javascript's window.screen? How are you going to translate a Rect into Javascript? Where is that used?
nite4000
Forum Contributor
Posts: 209
Joined: Sun Apr 12, 2009 11:31 am

Re: convert c# to Javascript

Post by nite4000 »

then you don't know anything about about c# or JS so then you are a waste of time as is this forum. will not be back
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: convert c# to Javascript(bump all of you-Closed)

Post by requinix »

I'm employed as a web developer and I specialize in PHP and C#.

Best of luck finding a C# developer who knows everything about your application without you having to tell them anything about it.
Post Reply