Skip to content

Instantly share code, notes, and snippets.

View jquave's full-sized avatar
✔️
jquave

Jameson Quave jquave

✔️
jquave
View GitHub Profile
class Command
attr_accessor :name, :response, :needs_arg
def initialize args
needs_arg = false # Default
args.each do |k,v|
instance_variable_set("@#{k}", v) unless v.nil?
end
puts 'Command added: '+name
// Called when a button is clicked. The view will be automatically dismissed after this call returns
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;
// Called when we cancel a view (eg. the user clicks the Home button). This is not called when the user clicks the cancel button.
// If not defined in the delegate, we simulate a click in the cancel button
- (void)actionSheetCancel:(UIActionSheet *)actionSheet;
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet; // before animation and showing view
- (void)didPresentActionSheet:(UIActionSheet *)actionSheet; // after animation
The Idea Phase
While the rest of this book focuses primarily on the distribution and development of apps, in this chapter we’ll take a quick detour and discuss the idea phase. While coming up with something completely new is not impossible, it’s very difficult. So it’s important to first understand a few points about the app market, and product development in general.
Competition is good
Let’s say you have idea for your next great app. Photo filters for pets, it’ll be awesome! While you’re thinking about this idea, figuring out what’s going to work best in terms of ease of use, marketability, and engineering, you might also take a quick stop to the app store to look for existing products. What do you see? Uh-oh, there are hundreds of results in the search, almost none of them have any reviews or ratings. With so many competitors, and so many of them not succeeding, what chance does your app have, you may be thinking.
Let me tell you why this is the wrong way to think about competition. In 1997 AOL released
using UnityEngine;
using System.Collections;
using System.Timers;
public class JQTimer {
public bool running = true;
System.Action action;
Timer timer;
using (AndroidJavaClass unity_player = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
{
AndroidJavaObject current_activity = unity_player.GetStatic<AndroidJavaObject>("currentActivity");
string obb_package = current_activity.Call<string>("getPackageName");
bool isAZConsole = current_activity.Call<AndroidJavaObject>("getPackageManager").Call<bool>("hasSystemFeature", "android.hardware.type.television");
if(isAZConsole) {
Debug.Log("java says console");
dfapp.isConsole = true;
}
else {
using (AndroidJavaClass unity_player = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
{
AndroidJavaObject current_activity = unity_player.GetStatic<AndroidJavaObject>("currentActivity");
string obb_package = current_activity.Call<string>("getPackageName");
bool isAZConsole = current_activity.Call<AndroidJavaObject>("getPackageManager").Call<bool>("hasSystemFeature", "android.hardware.type.television");
if(isAZConsole) {
// On AZ console
dfapp.isConsole = true;
}
else {
using UnityEngine;
using System.Collections;
using UnityEditor;
public class LevelEditorWindow : EditorWindow {
Texture levelData;
int previewSize = 500;
int topMargin = 50;
Color activeColor = Color.white;
using UnityEngine;
using System.Collections;
public class Enemy : MonoBehaviour {
public int hp = 5;
public GameObject dropPrefab;
public GameObject heartPrefab;
int maxWalkSpeed = 3;
int direction = 3;
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
public int metal = 200;
public int hp = 100;
QInput input;
public GameObject sentryPrefab;
float groundDist = 0.62f;
using UnityEngine;
using System.Collections;
using System.Reflection;
public class BlockColors {
Color wall = new Color(0,0,0);
Color enemySpawner = new Color(255,0,0);
Color floor = new Color(0, 255, 255);
Color spawnPoint = new Color(0, 255, 0);
Color goal = new Color(255, 255, 0);