Unity is the premier 2D/3D gaming platform out there. I've just started going through a series of tutorials from Stone River Learning. They're very nice.
Here's code for a 'constructor'. A constructor is when a class or struct is created, its constructor is called. Constructors have the same name as the class or struct, and they usually initialize the data members of the new object.
and here's a code snippet;
public struct Question
{
public string questionText;
public string[] answers;
public int correctAnswer;
// This is the constructor that initializes the Question struct/object
public Question(string questionText, string[] answers, int correctAnswer)
{
this.questionText = questionText;
this.answers = answers;
this.correctAnswer = correctAnswer;
}
}
public Question testQuestion = new Question ("What is your favorite color?", new string[]{"blue","green","yellow"}, 0);
Enumeration snippet;
foreach (GameObject p in TriviaPanels) {
p.SetActive (false);
Here's another note;
Try the search, it's linked to some great forums
Showing posts with label notes. Show all posts
Showing posts with label notes. Show all posts
Tuesday, January 19, 2016
Friday, July 17, 2015
Simple Database creation for Apps
This is my quick go to for creating a data file to use in an app. There are other better, quicker and more complex, but this is quick & easy/peasey!

That's all she wrote.
- Create a CSV file in the speadsheet of your choice. I use either Google's or OpenOffice.
- Run the file thru my favorite converter - Plist Converter, by cc ccc. It's also easy. Couldn't find the url, but here's what it looks like;
- Copy the resultant fileName.plist into your project.
- Write yourself some code to translae it into an NSArray or somethin'.
That's all she wrote.
Saturday, January 17, 2015
Facebook Integration notes
Notes & research;
FB Graph API URL - https://developers.facebook.com/docs/graph-api/common-scenarios
From FBs documentation
Good Wenderlich tutorial - http://www.raywenderlich.com/1626/facebook-tutorial-for-ios-how-to-post-to-a-user-wall-upload-photos-and-add-a-like-button-from-your-iphone-app
More Info from FBs API
Stunning example of FBs Story photo album I take back what I said about FBs slideshow features!
https://www.facebook.com/fanpage.it/posts/945924002095941
FB Graph API URL - https://developers.facebook.com/docs/graph-api/common-scenarios
From FBs documentation
Other links:Uploading Photos and Creating Photo AlbumsApps are able to publish and create new photo albums, and publish photos via the Graph API on behalf of people or Facebook Pages. Photos can be uploaded by sending the actual image files, or by using URLs of images already on the internet.
Read These Docs
Use These APIs
- Platform Policies that cover publishing behavior in apps.
- Guide to Publishing with the Graph API.
/{user-id}/albums
to create empty photo albums for people./{user-id}/photos
to add individual photos for people./{page-id}/albums
to create empty photo albums for Facebook Pages./{page-id}/photos
to add individual photos for Facebook Pages./{album-id}/photos
to add photos to an existing album for people or for Pages.
Good Wenderlich tutorial - http://www.raywenderlich.com/1626/facebook-tutorial-for-ios-how-to-post-to-a-user-wall-upload-photos-and-add-a-like-button-from-your-iphone-app
More Info from FBs API
FBs tutorial for an Open Graph Story integration - https://developers.facebook.com/docs/ios/open-graphTelling Stories with Open GraphOpen Graph lets apps tell stories on Facebook through a structured, strongly typed API.
People use stories to share the things they're doing, the people they're doing them with and the places where they happen. Open Graph lets you integrate apps deeply into the Facebook experience, which increases engagement, distribution and growth.
Stunning example of FBs Story photo album I take back what I said about FBs slideshow features!
https://www.facebook.com/fanpage.it/posts/945924002095941
Subscribe to:
Posts (Atom)