<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tutorials Archives - Oxmond Technology</title>
	<atom:link href="https://oxmond.com/tag/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://oxmond.com/tag/tutorials/</link>
	<description>IT Development</description>
	<lastBuildDate>Thu, 29 Dec 2022 13:07:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.2</generator>
	<item>
		<title>How To Drag and Drop a 2D Object</title>
		<link>https://oxmond.com/how-to-drag-and-drop-a-2d-object/</link>
					<comments>https://oxmond.com/how-to-drag-and-drop-a-2d-object/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Sun, 18 Aug 2019 19:32:12 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[Beginner Tutorial - Unity 2019]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[drag]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[drag and drop example]]></category>
		<category><![CDATA[drag gameobject with mouse]]></category>
		<category><![CDATA[drop]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[free lesson]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game object]]></category>
		<category><![CDATA[gameobject]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[instruction]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[unity 2019]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=501</guid>

					<description><![CDATA[<p>Learn how to drag a 2D object with the mouse. In this tutorial we will create at general drag and drop script you can use on any sprite.  ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game: https://bit.ly/SubscribeOxmondTutorials ✅ Download the free Japanese Dishes...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-drag-and-drop-a-2d-object/">How To Drag and Drop a 2D Object</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-weight: 400;">Learn how to drag a 2D object with the mouse. In this tutorial we will create at general drag and drop script you can use on any sprite. </span></p>
<hr />
<p><span style="font-weight: 400;">❤️ <strong>Subscribe to Oxmond Tutorials. Stay ahead of the game:</strong></span><span style="font-weight: 400;"><br />
</span><a href="https://bit.ly/SubscribeOxmondTutorials"><span style="font-weight: 400;">https://bit.ly/SubscribeOxmondTutorials</span></a></p>
<p><span style="font-weight: 400;"> ✅ <strong>Download the free Japanese Dishes sprites here:</strong></span><span style="font-weight: 400;"><br />
</span><a href="https://assetstore.unity.com/packages/2d/textures-materials/food/japanese-dishes-82383?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/packages/2d/textures-materials/food/japanese-dishes-82383?aid=1100l4p9k </span></a></p>
<p><span style="font-weight: 400;"><strong>✅ Other Free Assets in the Unity Assets Store:<br />
</strong></span><a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k </span></a></p>
<p>😷👕 <strong>Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:</strong><br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<hr />
<p><strong>The DragAndDrop script:</strong></p>
<pre>/*
   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 
*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DragAndDrop : MonoBehaviour
{

    private bool isDragging;

    public void OnMouseDown()
    {
        isDragging = true;
    }

    public void OnMouseUp()
    {
        isDragging = false;
    }

    void Update()
    {
        if (isDragging) {
            Vector2 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition) - transform.position;
            transform.Translate(mousePosition);
        }
    }
}
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-drag-and-drop-a-2d-object/">How To Drag and Drop a 2D Object</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-drag-and-drop-a-2d-object/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>How To Make A Character Look At The Mouse</title>
		<link>https://oxmond.com/how-to-make-a-character-look-at-the-mouse/</link>
					<comments>https://oxmond.com/how-to-make-a-character-look-at-the-mouse/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Sun, 18 Aug 2019 07:01:15 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[Beginner Tutorial - Unity 2019]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[character look at mouse]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[follow]]></category>
		<category><![CDATA[follow mouse position 2D]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[How To Make A Character Look At The Mouse]]></category>
		<category><![CDATA[intermediate]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[look]]></category>
		<category><![CDATA[look at mouse]]></category>
		<category><![CDATA[lookat]]></category>
		<category><![CDATA[lookat 2D]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[mouse look]]></category>
		<category><![CDATA[mouse movement]]></category>
		<category><![CDATA[movement]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[player look at mouse]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[towards]]></category>
		<category><![CDATA[Transform.LookAt]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[unity 2019]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=495</guid>

					<description><![CDATA[<p>How to make you character look at and follow the mouse. With only at few lines of code you can give extra life to your 2D game. ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game: https://bit.ly/SubscribeOxmondTutorials ✅ Download &#8220;the ghost&#8221; image here: https://oxmond.com/download/tutorials/unity/ghost.png...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-make-a-character-look-at-the-mouse/">How To Make A Character Look At The Mouse</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>How to make you character look at and follow the mouse. With only at few lines of code you can give extra life to your 2D game.</p>
<hr />
<p>❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game:<br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p>✅ Download &#8220;the ghost&#8221; image here:<br />
<a href="https://oxmond.com/download/tutorials/unity/ghost.png">https://oxmond.com/download/tutorials/unity/ghost.png</a></p>
<p>✅ Other Free Assets in the Unity Assets Store:<br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:<br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<p>Some links might be affiliate links. Any support is truly appreciated so we can keep on making high quality content 🙂</p>
<hr />
<p><strong>The Eye script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Eye : MonoBehaviour
{

    void Update()
    {
        Vector3 targetDir = Camera.main.ScreenToWorldPoint(Input.mousePosition) - transform.position;
        float angle = (Mathf.Atan2(targetDir.y, targetDir.x) * Mathf.Rad2Deg) - 90f;
        transform.rotation = Quaternion.AngleAxis(angle, Vector3.forward);
    }
}

</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-make-a-character-look-at-the-mouse/">How To Make A Character Look At The Mouse</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-make-a-character-look-at-the-mouse/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tilemaps! How To Paint With Tiles In Unity!</title>
		<link>https://oxmond.com/tilemaps-how-to-paint-with-tiles-in-unity/</link>
					<comments>https://oxmond.com/tilemaps-how-to-paint-with-tiles-in-unity/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Fri, 16 Aug 2019 10:50:00 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[brush]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[intermediate]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[paint]]></category>
		<category><![CDATA[palette]]></category>
		<category><![CDATA[sprites]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[tile]]></category>
		<category><![CDATA[tile palette]]></category>
		<category><![CDATA[tile system]]></category>
		<category><![CDATA[tilemap]]></category>
		<category><![CDATA[tilemap mouse]]></category>
		<category><![CDATA[Tilemaps! How To Paint With Tiles In Unity]]></category>
		<category><![CDATA[tiles]]></category>
		<category><![CDATA[tileset editor]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[unity 2019]]></category>
		<category><![CDATA[unity tilemap]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[Unity3D 2019 Beginner Tutorial]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=491</guid>

					<description><![CDATA[<p>How to use tiles and tilemaps in Unity 2019. Learn how to create a tile palette and paint with tiles/sprites with the mouse. If you have never used Unity&#8217;s tileset editor, this tutorial is for you! This tile system rocks! Unity 2019 beginner tutorial. ❤️...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/tilemaps-how-to-paint-with-tiles-in-unity/">Tilemaps! How To Paint With Tiles In Unity!</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-weight: 400;">How to use tiles and tilemaps in Unity 2019. Learn how to create a tile palette and paint with tiles/sprites with the mouse.</span></p>
<p>If you have never used Unity&#8217;s tileset editor, this tutorial is for you! This tile system rocks!</p>
<p>Unity 2019 beginner tutorial.</p>
<hr />
<p><strong>❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game:</strong><span style="font-weight: 400;"><br />
</span><a href="https://bit.ly/SubscribeOxmondTutorials"><span style="font-weight: 400;">https://bit.ly/SubscribeOxmondTutorials</span></a></p>
<p><strong> ✅ Get the free Backyard Top-Down Tileset here:<br />
</strong><a href="https://assetstore.unity.com/packages/2d/environments/backyard-top-down-tileset-53854?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/packages/2d/environments/backyard-top-down-tileset-53854?aid=1100l4p9k </span></a></p>
<p><strong> ✅ Other Free Assets in the Unity Assets Store:<br />
</strong><a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k </span></a></p>
<p>😷👕 <strong>Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:</strong><br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<p><span style="font-weight: 400;"><br />
</span><em><span style="font-weight: 400;">Some links might be affiliate links. Any support is truly appreciated so we can keep on making high quality content<br />
</span></em></p>
<p>The post <a rel="nofollow" href="https://oxmond.com/tilemaps-how-to-paint-with-tiles-in-unity/">Tilemaps! How To Paint With Tiles In Unity!</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/tilemaps-how-to-paint-with-tiles-in-unity/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Stream Vimeo Videos in Unity!</title>
		<link>https://oxmond.com/how-to-stream-vimeo-videos-in-unity/</link>
					<comments>https://oxmond.com/how-to-stream-vimeo-videos-in-unity/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Wed, 14 Aug 2019 20:19:24 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[How to stream Vimeo videos in Unity!]]></category>
		<category><![CDATA[intermediate]]></category>
		<category><![CDATA[Intermediate Tutorial Unity3D 2019]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[render texture]]></category>
		<category><![CDATA[stream]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[unity 2019]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[video game]]></category>
		<category><![CDATA[video texture]]></category>
		<category><![CDATA[videos]]></category>
		<category><![CDATA[vimeo]]></category>
		<category><![CDATA[vimeo videos]]></category>
		<category><![CDATA[vimeo videos tutorial]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=486</guid>

					<description><![CDATA[<p>Is it possible to stream Vimeo videos in Unity? Yes it is! And it is quite easy too. But you need a Vimeo Pro license, the streaming features are not available in the Free/Plus plans. ···················································································· ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-stream-vimeo-videos-in-unity/">How to Stream Vimeo Videos in Unity!</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Is it possible to stream Vimeo videos in Unity? Yes it is! And it is quite easy too. But you need a Vimeo Pro license, the streaming features are not available in the Free/Plus plans.</p>
<p>····················································································</p>
<p>❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game:<br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p>✅ Try the game Asteroids game here:<br />
<a href="https://oxmond.com/games/asteroids/">https://oxmond.com/games/asteroids/</a></p>
<p>✅ Free Asset Packages at the Unity Assets Store:<br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:<br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<p>Asset Store links sponsored by Unity</p>
<p>Any support is truly appreciated so we can keep on making high quality content 🙂</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-stream-vimeo-videos-in-unity/">How to Stream Vimeo Videos in Unity!</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-stream-vimeo-videos-in-unity/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to change the cursor in Unity</title>
		<link>https://oxmond.com/how-to-change-the-cursor-in-unity/</link>
					<comments>https://oxmond.com/how-to-change-the-cursor-in-unity/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Wed, 14 Aug 2019 19:43:51 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[cursor change]]></category>
		<category><![CDATA[cursor sprite]]></category>
		<category><![CDATA[cursor visible]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[hide]]></category>
		<category><![CDATA[How To Change The Cursor In Unity]]></category>
		<category><![CDATA[intermediate]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[look]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[mouse look]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[stream]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[unity 2019]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[Unity3D 2019 Beginner Tutorial]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[videos]]></category>
		<category><![CDATA[visible]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=477</guid>

					<description><![CDATA[<p>How to change the cursor in Unity! In this tutorial we will have a close look at the mouse. How to hide and show the cursor, and how to change the cursor sprite from a script. ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-change-the-cursor-in-unity/">How to change the cursor in Unity</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-weight: 400;">How to change the cursor in Unity! </span><span style="font-weight: 400;"><br />
</span><span style="font-weight: 400;">In this tutorial we will have a close look at the mouse. How to hide and show the cursor, and how to change the cursor sprite from a script.</span></p>
<hr />
<p>❤️ <strong>Subscribe to Oxmond Tutorials. Stay ahead of the game:</strong><br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p>✅<strong> Get the free Pixel Cursors here:</strong><br />
<a href="https://assetstore.unity.com/packages/2d/gui/icons/pixel-cursors-109256?aid=1100l4p9k">https://assetstore.unity.com/packages/2d/gui/icons/pixel-cursors-109256?aid=1100l4p9k</a></p>
<p>✅ <strong>Free Assets at the Unity Assets Store:</strong><br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k </a></p>
<p>😷👕 <strong>Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:</strong><br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<p><strong>Script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Gem : MonoBehaviour
{

    public Texture2D cursorArrow;
    public Texture2D cursorPickaxe;

    void Start()
    {
        // Cursor.visible = false;
        Cursor.SetCursor(cursorArrow, Vector2.zero, CursorMode.ForceSoftware);
    }

    void OnMouseEnter()
    {
        Cursor.SetCursor(cursorPickaxe, Vector2.zero, CursorMode.ForceSoftware);
    }

    void OnMouseExit()
    {
        Cursor.SetCursor(cursorArrow, Vector2.zero, CursorMode.ForceSoftware);
    }

}

</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-change-the-cursor-in-unity/">How to change the cursor in Unity</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-change-the-cursor-in-unity/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Buttons! How to create and script a button</title>
		<link>https://oxmond.com/how-to-create-and-script-buttons/</link>
					<comments>https://oxmond.com/how-to-create-and-script-buttons/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Wed, 22 May 2019 12:51:23 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[down]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[gameplay]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[press]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[up Unity]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=455</guid>

					<description><![CDATA[<p>How to create buttons in Unity? Let&#8217;s have a look. We will create and script buttons in this Unity tutorial for beginners. ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game: https://bit.ly/SubscribeOxmondTutorials ✅ Check Out the Free Asset Packages at the Unity Assets Store:...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-create-and-script-buttons/">Buttons! How to create and script a button</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>How to create buttons in Unity? Let&#8217;s have a look. We will create and script buttons in this Unity tutorial for beginners.</p>
<hr />
<p>❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game:<br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p>✅ Check Out the Free Asset Packages at the Unity Assets Store:<br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:<br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<hr />
<p><strong>The Button script:</strong></p>
<pre>
/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using UnityEngine;
using UnityEngine.Events;

public class Button : MonoBehaviour
{

    public Sprite btnUp;
    public Sprite btnDown;
    public UnityEvent buttonClick;

    void Awake()
    {
        if (buttonClick == null) { buttonClick = new UnityEvent(); }
    }

    void OnMouseDown()
    {
        GetComponent().sprite = btnDown;
    }

    void OnMouseUp()
    {
        print("Click!");
        buttonClick.Invoke();
        GetComponent().sprite = btnUp;
    }
}

</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-create-and-script-buttons/">Buttons! How to create and script a button</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-create-and-script-buttons/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>How to make multiple copies (clones) of a GameObject. Unity 2019 beginner tutorial</title>
		<link>https://oxmond.com/how-to-make-multiple-copies-of-a-gameobject/</link>
					<comments>https://oxmond.com/how-to-make-multiple-copies-of-a-gameobject/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Thu, 16 May 2019 17:41:45 +0000</pubDate>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[duplicate]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[gameplay]]></category>
		<category><![CDATA[instantiate]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[paste]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Unity3d]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=448</guid>

					<description><![CDATA[<p>How to clone, copy, duplicate&#8230;developers call this &#8220;to instantiate an object&#8221;. In this video we will take a look at how we can clone (instantiate) an object. It&#8217;s easy and very, very useful in almost all kinds of game development. ❤️ Subscribe to Oxmond Tutorials....</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-make-multiple-copies-of-a-gameobject/">How to make multiple copies (clones) of a GameObject. Unity 2019 beginner tutorial</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>How to clone, copy, duplicate&#8230;developers call this &#8220;to instantiate an object&#8221;. In this video we will take a look at how we can clone (instantiate) an object. It&#8217;s easy and very, very useful in almost all kinds of game development.</p>
<hr />
<p>❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game:<br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p>✅ Check Out the Free Asset Packages at the Unity Assets Store:<br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:<br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<hr />
<pre>/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using UnityEngine;

public class Coin : MonoBehaviour
{
    void Update()
    {
        transform.Rotate(new Vector3(0f, 100f, 0f) * Time.deltaTime);
    }
}
</pre>
<pre>/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using System.Collections.Generic;
using UnityEngine;

public class Gameplay : MonoBehaviour
{

    public GameObject coinOriginal;
    public GameObject coinContainer;

    void Start()
    {
        CreateCoins(60);
    }

    private void CreateCoins(int coinsNum)
    {
        for (int i = 0; i &lt; coinsNum; i++)
        {
            // GameObject CoinClone = Instantiate(coinOriginal);
            GameObject CoinClone = Instantiate(coinOriginal, new Vector3(i * 0.6f, coinOriginal.transform.position.y, i * 0.75f), coinOriginal.transform.rotation);
            CoinClone.name = "CoinClone-" + (i + 1);
            CoinClone.transform.parent = coinContainer.transform;
        }
    }

    public void DestroyAllCoins()
    {
            var coins = new List();
            foreach (Transform child in coinContainer.transform) coins.Add(child.gameObject);
            coins.ForEach(child =&gt; Destroy(child));
    }


}
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-make-multiple-copies-of-a-gameobject/">How to make multiple copies (clones) of a GameObject. Unity 2019 beginner tutorial</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-make-multiple-copies-of-a-gameobject/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Create the Iconic Asteroids Arcade Gameplay! Unity 2019 Intermediate Tutorial</title>
		<link>https://oxmond.com/asteroids-arcade-gameplay/</link>
					<comments>https://oxmond.com/asteroids-arcade-gameplay/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Mon, 13 May 2019 10:07:34 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[Asteroids]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[gameplay]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[skybox]]></category>
		<category><![CDATA[star]]></category>
		<category><![CDATA[stars]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[Unity3d]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=445</guid>

					<description><![CDATA[<p>Learn how to setup and code the iconic Asteroids shooter arcade gameplay originally designed by Lyle Rains &#38; Ed Logg and released by Atari in 1979. ···················································································· ❤️ Subscribe to Oxmond Tutorials https://bit.ly/SubscribeOxmondTutorials 🚀 Play the game here: https://oxmond.com/games/asteroids/ ✅ Download the free star skybox here...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/asteroids-arcade-gameplay/">How to Create the Iconic Asteroids Arcade Gameplay! Unity 2019 Intermediate Tutorial</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Learn how to setup and code the iconic Asteroids shooter arcade gameplay originally designed by Lyle Rains &amp; Ed Logg and released by Atari in 1979.</p>
<p>····················································································</p>
<p>❤️ <strong>Subscribe to Oxmond Tutorials</strong><br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p><strong>🚀 Play the game here:</strong><br />
<a href="https://oxmond.com/games/asteroids/">https://oxmond.com/games/asteroids/</a></p>
<p>✅<strong> Download the free star skybox here (Real Stars Skybox):</strong><br />
<a href="https://assetstore.unity.com/packages/3d/environments/sci-fi/real-stars-skybox-116333?aid=1100l4p9k">https://assetstore.unity.com/packages/3d/environments/sci-fi/real-stars-skybox-116333?aid=1100l4p9k</a></p>
<p>✅<strong> Download Yughues Free Rocks here:</strong><br />
<a href="https://assetstore.unity.com/packages/3d/environments/yughues-free-rocks-13568?aid=1100l4p9k">https://assetstore.unity.com/packages/3d/environments/yughues-free-rocks-13568?aid=1100l4p9k</a></p>
<p>✅ <strong>Download the Rocket mesh here:</strong><br />
<a href="https://assetstore.unity.com/packages/3d/vehicles/space/atom-rocket-model-140021?aid=1100l4p9k">https://assetstore.unity.com/packages/3d/vehicles/space/atom-rocket-model-140021?aid=1100l4p9k</a></p>
<p>✅ <strong>Other free Asset Packages at the Unity Assets Store:</strong><br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 <strong>Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:</strong><br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<hr />
<p><strong>Asteroid.cs</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com 

*/

using UnityEngine;

public class Asteroid : MonoBehaviour
{

    public GameObject rock;
    public Gameplay gameplay;
    private float maxRotation;
    private float rotationX;
    private float rotationY;
    private float rotationZ;
    private Rigidbody rb;
    private Camera mainCam;
    private float maxSpeed;
    private int _generation;

    void Start()
    {

        mainCam = Camera.main;

        maxRotation = 25f;
        rotationX = Random.Range(-maxRotation, maxRotation);
        rotationY = Random.Range(-maxRotation, maxRotation);
        rotationZ = Random.Range(-maxRotation, maxRotation);

        rb = rock.GetComponent();

        float speedX = Random.Range(200f, 800f);
        int selectorX = Random.Range(0, 2);
        float dirX = 0;
        if (selectorX == 1) { dirX = -1; }
        else { dirX = 1; }
        float finalSpeedX = speedX * dirX;
        rb.AddForce(transform.right * finalSpeedX);

        float speedY = Random.Range(200f, 800f);
        int selectorY = Random.Range(0, 2);
        float dirY = 0;
        if (selectorY == 1) { dirY = -1; }
        else { dirY = 1; }
        float finalSpeedY = speedY * dirY;
        rb.AddForce(transform.up * finalSpeedY);

    }

    public void SetGeneration(int generation)
    {
        _generation = generation;
    }

    void Update()
    {
        rock.transform.Rotate(new Vector3(rotationX, rotationY, 0) * Time.deltaTime);
        CheckPosition();
        float dynamicMaxSpeed = 3f;
        rb.velocity = new Vector2(Mathf.Clamp(rb.velocity.x, -dynamicMaxSpeed, dynamicMaxSpeed), Mathf.Clamp(rb.velocity.y, -dynamicMaxSpeed, dynamicMaxSpeed));
    }

    void OnCollisionEnter(Collision collisionInfo)
    {
        if (collisionInfo.collider.name == "Bullet(Clone)")
        {
            if (_generation &lt; 3)
            {
                CreateSmallAsteriods(2);
            }
            Destroy();
        }

        if (collisionInfo.collider.name == "Rocket")
        {
            gameplay.RocketFail();
        }
    }

    void CreateSmallAsteriods(int asteroidsNum)
    {
        int newGeneration = _generation + 1;
        for (int i = 1; i &lt;= asteroidsNum; i++)
        {
            float scaleSize = 0.5f;
            GameObject AsteroidClone = Instantiate(rock, new Vector3(transform.position.x, transform.position.y, 0f), transform.rotation);
            AsteroidClone.transform.localScale = new Vector3(AsteroidClone.transform.localScale.x * scaleSize, AsteroidClone.transform.localScale.y * scaleSize, AsteroidClone.transform.localScale.z * scaleSize);
            AsteroidClone.GetComponent().SetGeneration(newGeneration);
            AsteroidClone.SetActive(true);
        }
    }

    private void CheckPosition()
    {

        float sceneWidth = mainCam.orthographicSize * 2 * mainCam.aspect;
        float sceneHeight = mainCam.orthographicSize * 2;
        float sceneRightEdge = sceneWidth / 2;
        float sceneLeftEdge = sceneRightEdge * -1;
        float sceneTopEdge = sceneHeight / 2;
        float sceneBottomEdge = sceneTopEdge * -1;

        float rockOffset;
        if (gameplay.allAsteroidsOffScreen)
        {
            rockOffset = 1.0f;
            float reverseSpeed = 2000.1f;

            if (rock.transform.position.x &gt; sceneRightEdge + rockOffset)
            {
                rock.transform.rotation = Quaternion.identity;
                rb.AddForce(transform.right * (reverseSpeed * (-1)));
            }

            if (rock.transform.position.x &lt; sceneLeftEdge - rockOffset) { rock.transform.rotation = Quaternion.identity; rb.AddForce(transform.right * reverseSpeed); } if (rock.transform.position.y &gt; sceneTopEdge + rockOffset)
            {
                rock.transform.rotation = Quaternion.identity;
                rb.AddForce(transform.up * (reverseSpeed * (-1)));
            }

            if (rock.transform.position.y &lt; sceneBottomEdge - rockOffset) { rock.transform.rotation = Quaternion.identity; rb.AddForce(transform.up * reverseSpeed); } } else { rockOffset = 2.0f; if (rock.transform.position.x &gt; sceneRightEdge + rockOffset)
            {
                rock.transform.position = new Vector2(sceneLeftEdge - rockOffset, rock.transform.position.y);
            }

            if (rock.transform.position.x &lt; sceneLeftEdge - rockOffset) { rock.transform.position = new Vector2(sceneRightEdge + rockOffset, rock.transform.position.y); } if (rock.transform.position.y &gt; sceneTopEdge + rockOffset)
            {
                rock.transform.position = new Vector2(rock.transform.position.x, sceneBottomEdge - rockOffset);
            }

            if (rock.transform.position.y &lt; sceneBottomEdge - rockOffset)
            {
                rock.transform.position = new Vector2(rock.transform.position.x, sceneTopEdge + rockOffset);
            }
        }
    }

    public void Destroy()
    {
        gameplay.asterodDestroyed();
        Destroy(gameObject, 0.01f);
    }

    public void DestroySilent()
    {
        Destroy(gameObject, 0.00f);
    }

}

</pre>
<p><strong>Bullet.cs</strong></p>
<pre>
/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com 

*/

using UnityEngine;

public class Bullet : MonoBehaviour
{
    void Start()
    {
        GetComponent().AddForce(transform.up * 350);
    }

    public void KillOldBullet()
    {
        Destroy(gameObject, 2.0f);
    }

    void OnCollisionEnter(Collision collisionInfo)
    {
        Destroy(gameObject, 0.0f);
    }
}

</pre>
<p>
<strong>Gameplay.cs</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com 

*/

using UnityEngine;

public class Gameplay : MonoBehaviour
{

    public GameObject asteroid;
    public GameObject rocket;
    private int _startLevelAsteroidsNum;
    private bool _allAsteroidsOffScreen;
    private int levelAsteroidNum;
    private Camera mainCam;
    private int asteroidLife;

    private void Start()
    {
        asteroid.SetActive(false);
        mainCam = Camera.main;
        _startLevelAsteroidsNum = 2;
        CreateAsteroids(_startLevelAsteroidsNum);
    }

    private void Update()
    {
        RenderSettings.skybox.SetFloat("_Rotation", Time.time * 0.8f);

        if (asteroidLife &lt;= 0)
        {
            asteroidLife = 6;
            CreateAsteroids(1);
        }
        
        float sceneWidth = mainCam.orthographicSize * 2 * mainCam.aspect;
        float sceneHeight = mainCam.orthographicSize * 2;
        float sceneRightEdge = sceneWidth / 2;
        float sceneLeftEdge = sceneRightEdge * -1;
        float sceneTopEdge = sceneHeight / 2;
        float sceneBottomEdge = sceneTopEdge * -1;

        _allAsteroidsOffScreen = true;
        
    }

    private void CreateAsteroids(float asteroidsNum)
    {
        for (int i = 1; i &lt;= asteroidsNum; i++)
        {
            GameObject AsteroidClone = Instantiate(asteroid, new Vector2(Random.Range(-10, 10), 6f), transform.rotation);
            AsteroidClone.GetComponent().SetGeneration(1);
            AsteroidClone.SetActive(true);
        }
    }

    public void RocketFail()
    {
        Cursor.visible = true;
        print("GAME OVER");
    }

    public void asterodDestroyed()
    {
        asteroidLife--;
    }

    public int startLevelAsteroidsNum
    {
        get { return _startLevelAsteroidsNum; }
    }

    public bool allAsteroidsOffScreen
    {
        get { return _allAsteroidsOffScreen; }
    }

}</pre>
<hr />
<p>
<strong>Rocket.cs</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com 

*/

using UnityEngine;

public class Rocket : MonoBehaviour
{
    public GameObject bullet;
    private float thrust = 6f;
    private float rotationSpeed = 180f;
    private float MaxSpeed = 4.5f;
    private Camera mainCam;
    private Rigidbody rb;

    private void Start()
    {
        mainCam = Camera.main;
        rb = GetComponent();
        bullet.SetActive(false);
    }

    private void FixedUpdate()
    {
        ControlRocket();
        CheckPosition();
    }

    private void Update()
    {
        if (Input.GetMouseButtonDown(0) || Input.GetKeyDown("space"))
        {
            Shoot();
        }
    }

    private void ControlRocket()
    {
        transform.Rotate(0, 0, Input.GetAxis("Horizontal") * rotationSpeed * Time.deltaTime);
        rb.AddForce(transform.up * thrust * Input.GetAxis("Vertical"));
        rb.velocity = new Vector2(Mathf.Clamp(rb.velocity.x, -MaxSpeed, MaxSpeed), Mathf.Clamp(rb.velocity.y, -MaxSpeed, MaxSpeed));
    }

    private void CheckPosition()
    {

        float sceneWidth = mainCam.orthographicSize * 2 * mainCam.aspect;
        float sceneHeight = mainCam.orthographicSize * 2;

        float sceneRightEdge = sceneWidth / 2;
        float sceneLeftEdge = sceneRightEdge * -1;
        float sceneTopEdge = sceneHeight / 2;
        float sceneBottomEdge = sceneTopEdge * -1;

        if (transform.position.x &gt; sceneRightEdge)
        {
            transform.position = new Vector2(sceneLeftEdge, transform.position.y);
        }
        if (transform.position.x &lt; sceneLeftEdge) { transform.position = new Vector2(sceneRightEdge, transform.position.y); } if (transform.position.y &gt; sceneTopEdge)
        {
            transform.position = new Vector2(transform.position.x, sceneBottomEdge);
        }
        if (transform.position.y &lt; sceneBottomEdge)
        {
            transform.position = new Vector2(transform.position.x, sceneTopEdge);
        }
    }

    public void ResetRocket()
    {
        transform.position = new Vector2(0f, 0f);
        transform.eulerAngles = new Vector3(0, 180f, 0);
        rb.velocity = new Vector3(0f, 0f, 0f);
        rb.angularVelocity = new Vector3(0f, 0f, 0f);
    }

    void Shoot()
    {
            GameObject BulletClone = Instantiate(bullet, new Vector2(bullet.transform.position.x, bullet.transform.position.y), transform.rotation);
            BulletClone.SetActive(true);
            BulletClone.GetComponent().KillOldBullet();
            BulletClone.GetComponent().AddForce(transform.up * 350);
    }
}

</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/asteroids-arcade-gameplay/">How to Create the Iconic Asteroids Arcade Gameplay! Unity 2019 Intermediate Tutorial</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/asteroids-arcade-gameplay/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Create a VR app in only 7 minutes!</title>
		<link>https://oxmond.com/create-a-vr-app-in-only-7-minutes/</link>
					<comments>https://oxmond.com/create-a-vr-app-in-only-7-minutes/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Thu, 27 Dec 2018 04:28:46 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2018]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[beginners]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Earth]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game making]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[star skybox]]></category>
		<category><![CDATA[stars]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[Virtual Reality]]></category>
		<category><![CDATA[VR]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=440</guid>

					<description><![CDATA[<p>How to create a Virtual Reality App in Unity. After a just few minutes of work, you and your friends can fly around our beautiful Earth and have a look at the 5000 brightest stars. All in your own home made app. What&#8217;s not to...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/create-a-vr-app-in-only-7-minutes/">Create a VR app in only 7 minutes!</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>How to create a Virtual Reality App in Unity. After a just few minutes of work, you and your friends can fly around our beautiful Earth and have a look at the 5000 brightest stars. All in your own home made app. What&#8217;s not to like? Unity Intermediate Tutorial</p>
<hr />
<p><strong>❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game:</strong><br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p><strong>✅ Download the free star skybox here (Real Stars Skybox):</strong><br />
<a href="https://assetstore.unity.com/packages/3d/environments/sci-fi/real-stars-skybox-116333?aid=1100l4p9k">https://assetstore.unity.com/packages/3d/environments/sci-fi/real-stars-skybox-116333?aid=1100l4p9k</a></p>
<p><strong>✅ Download the free Earth Model here (Earth Rendering Free):</strong><br />
<a href="https://assetstore.unity.com/packages/vfx/shaders/earth-rendering-free-54914?aid=1100l4p9k">https://assetstore.unity.com/packages/vfx/shaders/earth-rendering-free-54914?aid=1100l4p9k</a></p>
<p><strong>✅ Download the free Google VR SDK for Unity:</strong><br />
<a href="https://github.com/googlevr/gvr-unity-sdk/releases">https://github.com/googlevr/gvr-unity-sdk/releases</a></p>
<p><strong>✅ Other free Asset Packages at the Unity Assets Store:</strong><br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 <strong>Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:</strong><br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<p><strong>The Earth rotation script:</strong></p>
<pre>using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Earth : MonoBehaviour
{
    void Update()
    {
        transform.Rotate(0f, 8f * Time.deltaTime, 0f);        
    }
}
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/create-a-vr-app-in-only-7-minutes/">Create a VR app in only 7 minutes!</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/create-a-vr-app-in-only-7-minutes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Animations Basics! How to Rotate Objects</title>
		<link>https://oxmond.com/animations-basics-how-to-rotate-objects/</link>
					<comments>https://oxmond.com/animations-basics-how-to-rotate-objects/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Fri, 14 Dec 2018 12:41:20 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2018]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[beginners]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[coin]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dotween]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game making]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[itween]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[rotate]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[tween]]></category>
		<category><![CDATA[tweens]]></category>
		<category><![CDATA[Unity3d]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=404</guid>

					<description><![CDATA[<p>Animation Tutorial for beginners. How to rotate objects in Unity. Using the Update() method, Unity Animation tools or a Tween tool like iTween or DOTween (HOTween v2) ❤️ Subscribe to Oxmond Tutorials: https://bit.ly/SubscribeOxmondTutorials ✅ Download the free iTween tool here: https://assetstore.unity.com/packages/tools/animation/itween-84?aid=1100l4p9k ✅ iTween documentation: http://www.pixelplacement.com/itween/documentation.php...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/animations-basics-how-to-rotate-objects/">Animations Basics! How to Rotate Objects</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-weight: 400;">Animation Tutorial for beginners. How to rotate objects in Unity. Using the Update() method, Unity Animation tools or a Tween tool like iTween or DOTween </span><span style="font-weight: 400;">(HOTween v2)</span></p>
<hr />
<p><span style="font-weight: 400;"><strong>❤️ Subscribe to Oxmond</strong> Tutorials:<br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></span></p>
<p><strong>✅ Download the free iTween tool here:</strong><br />
<a href="https://assetstore.unity.com/packages/tools/animation/itween-84?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/packages/tools/animation/itween-84?aid=1100l4p9k</span></a></p>
<p><strong>✅ iTween documentation:<br />
</strong><a href="http://www.pixelplacement.com/itween/documentation.php">http://www.pixelplacement.com/itween/documentation.php</a></p>
<p><span style="font-weight: 400;"><strong>✅ Other free Asset Packages at the Unity Assets Store:<br />
</strong></span><a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 <strong>Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:</strong><br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<hr />
<p><strong>Rotate script:</strong></p>
<pre>/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Rotate : MonoBehaviour {

	void Update () {
        transform.Rotate(new Vector3(0f, 0f, 100f) * Time.deltaTime);
	}
}
</pre>
<p><strong>Set rotation:</strong></p>
<pre>
transform.eulerAngles = new Vector3(0, 100f, 0);
</pre>
<p><strong>Rotate iTween script:</strong></p>
<pre>/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RotateTween : MonoBehaviour {

    public iTween.EaseType easeType;
    public iTween.LoopType loopType;
	
	void Start () {
        iTween.RotateTo(this.gameObject, iTween.Hash("z", 180, "time", 1.5f, "easetype", easeType, "looptype", loopType));
	}
}

</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/animations-basics-how-to-rotate-objects/">Animations Basics! How to Rotate Objects</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/animations-basics-how-to-rotate-objects/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
