Unity - 2D Space Shooter Tutorial Extra - Accelerometer Input and Shoot Virtual Button
In this tutorial we'll expand on our Unity 2D Space Shooter tutorial series. In this tutorial we'll set IOS (or Android) as our target platform.
We'll implement:
1) Getting input from the accelerometer to control and move the player spaceship.
2)And also we'll implement a virtual shoot button for the player.
To keep things simple and the code cleaner, we’re going to assume that the game project is specific for IOS (or Android).
If you want your Unity project to target multiple platforms you can use Unity’s platform defines to compile and execute a section of code for a specific platform.
#if UNITY_STANDALONE_WIN
Debug.Log("Windows Only");
#elif UNITY_IPHONE || UNITY_ANDROID
Debug.Log("iPhone or Android Only");
#else
Debug.Log("Any other platform");
#endif
About:
In this series of tutorials we’ll be making a 2D space shooter game made in Unity3D 5.1 and we’ll be programming in C#. This is a series of tutorials aimed for beginners who want to learn game development in Unity3D. We’ll assume you have some knowledge in a programming language, and that you are somewhat familiar with Unity’s interface.
References:
Unity – Manual: Platform Dependent Compilation
Unity – Manual: Unity Remote 4
Additional Notes:
The shoot button sprite can be downloaded here:
https://www.dropbox.com/s/zlpznsu20ljdbd8/shoot_button02.png?dl=0
Tutorial playlist:
https://www.youtube.com/playlist?list=PLRN2Qvxmju0Mf1GB1hXsT-x1GQJQ0pwE0
Unity 2D Space Shooter Tutorial Part 1. (Project Setup and Player Animation)
Unity 2D Space Shooter Tutorial Part 2. (Player Input Movement)
Unity 2D Space Shooter Tutorial Part 3. (Player Bullet and Player Shooting)
Unity 2D Space Shooter Tutorial Part 4. (Enemy Animation and Enemy Spawner)
Unity 2D Space Shooter Tutorial Part 5. (Enemy Bullet and Enemy Shooting)
Unity 2D Space Shooter Tutorial Part 6. (Explosion Animation and Collision Detection)
Unity 2D Space Shooter Tutorial Part 7. (Lives UI, Play Button, and Game Manager)
Unity 2D Space Shooter Tutorial Part 8. (Score UI, SFX, and Bg Music)
Unity 2D Space Shooter Tutorial Part 9. (Game Scrolling Background)
Unity 2D Space Shooter Tutorial Part 10. (Timer UI and Game Title)
Infinite Cosmos by Digital Math.
Licensed under a Creative Commons License.
https://soundcloud.com/digital-math
http://creativecommons.org/licenses/by/3.0/
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Unity - 2D Space Shooter Tutorial Extra - Accelerometer Input and Shoot Virtual Button», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.