Some Basic Conversions from JavaScript to C#

My company is asking me to make a text-based game using Unity (I know) so I’m trying to get a better grasp of the GUI system since I figure I’ll be needed to use that almost exclusively.

They’ve also asked that I do it in C# since the experience will help if we decide to make something for XBLA. Problem is that I have no experience in programming and the guidebook I’m using is written in Java. Any help you can give would be appreciated.

Text is “Unity 3D Game Development By Example” by Ryan Creighton.

When setting up variables there are two areas I don’t know how to do in C#. Snipped out excess code. The project is to create a “Memory” type game where you flip cards over and try to find it’s pair.

class Card extends System.Object
{
    var aCards:Array;
    var aGrid:Array;
    var aCardsFlipped;ArrayList;
    var img : String;

function Card()
  {
    img = "robot";
  }
}

I’m not sure how to set an image as a variable, nor how to set up Arrays / ArrayLists as variables. I’ve tried looking around online but there is very little stuff for C# out there. Thanks again for any help you can give. (Any advice on making a text-based game would also be appreciated…just kidding. :frowning: )

There’s very little stuff for C# out there? Are you kidding me? There are literally dozens and dozens of books on it.

ArrayLists/arrays. 2. Your homework.