Пример #1
0
        // yes its dynamic but it is also modifyable
        // you don't want this sort of stuff going on inside of your actual program
        // lots of if and else statements and logic
        void Update()
        {
            return;             // < "deactivating"


            if (Input.GetKeyDown(KeyCode.U))
            {
                EnemyShip ship = new UFOEnemyShip();
                DoStuffEnemy(ship);
            }
            else if (Input.GetKeyDown(KeyCode.R))
            {
                EnemyShip ship = new RocketEnemyShip();
                DoStuffEnemy(ship);
            }
        }
		// yes its dynamic but it is also modifyable
		// you don't want this sort of stuff going on inside of your actual program
		// lots of if and else statements and logic
		void Update ()
		{
			return; // < "deactivating"
		
		
			if (Input.GetKeyDown (KeyCode.U))
			{
				EnemyShip ship = new UFOEnemyShip ();
				DoStuffEnemy (ship);
			}
		else if (Input.GetKeyDown (KeyCode.R))
			{
				EnemyShip ship = new RocketEnemyShip ();
				DoStuffEnemy (ship);
			}
		}
		void Start ()
		{
			EnemyShip ufo = new UFOEnemyShip ();
			Debug.Log ("What kind of ship do you want? (R / U)");
		}
Пример #4
0
        void Start()
        {
            EnemyShip ufo = new UFOEnemyShip();

            Debug.Log("What kind of ship do you want? (R / U)");
        }