<?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>control Archives - Oxmond Technology</title>
	<atom:link href="https://oxmond.com/tag/control/feed/" rel="self" type="application/rss+xml" />
	<link>https://oxmond.com/tag/control/</link>
	<description>IT Development</description>
	<lastBuildDate>Wed, 18 Nov 2020 05:16:32 +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>Git Integration! Setting Up Unity with Git, SourceTree &#038; Bitbucket</title>
		<link>https://oxmond.com/git-integration-setting-up-unity-with-git-sourcetree-bitbucket/</link>
					<comments>https://oxmond.com/git-integration-setting-up-unity-with-git-sourcetree-bitbucket/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Sun, 08 Sep 2019 12:58:33 +0000</pubDate>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[bitbucket]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Git for Unity Developers]]></category>
		<category><![CDATA[Git Integration! Setting Up Unity with Git]]></category>
		<category><![CDATA[git source control]]></category>
		<category><![CDATA[gitignore]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[ignore]]></category>
		<category><![CDATA[improve]]></category>
		<category><![CDATA[improve workflow with Git]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[merging]]></category>
		<category><![CDATA[merging unity code]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[sourcetree]]></category>
		<category><![CDATA[Sourcetree & Bitbucket]]></category>
		<category><![CDATA[step-by-step]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[unity git setup]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[version control]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[workflow]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=602</guid>

					<description><![CDATA[<p>Improve your workflow! Use Git for you Unity project! In this tutorial we set up a new Unity project with Git, Sourcetree and BitBucket. ✅ Download the Sourcetree client: https://www.sourcetreeapp.com/ ❤️ Subscribe to Oxmond Tutorials! Stay ahead of the game! https://bit.ly/SubscribeOxmondTutorials 🔔 Remember to hit...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/git-integration-setting-up-unity-with-git-sourcetree-bitbucket/">Git Integration! Setting Up Unity with Git, SourceTree &#038; Bitbucket</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Improve your workflow! Use Git for you Unity project! In this tutorial we set up a new Unity project with Git, Sourcetree and BitBucket.</p>
<p>✅ <strong>Download the Sourcetree client:</strong><br />
<a href="https://www.sourcetreeapp.com/">https://www.sourcetreeapp.com/</a></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>🔔 Remember to hit that little bell to turn on notifications!</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> Download free assets from the Unity Assets Store for your game:</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>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/git-integration-setting-up-unity-with-git-sourcetree-bitbucket/">Git Integration! Setting Up Unity with Git, SourceTree &#038; Bitbucket</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/git-integration-setting-up-unity-with-git-sourcetree-bitbucket/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Build a Video Player With Scrub Control in Unity!</title>
		<link>https://oxmond.com/how-to-build-a-video-player-with-scrub-control-in-unity/</link>
					<comments>https://oxmond.com/how-to-build-a-video-player-with-scrub-control-in-unity/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Fri, 06 Sep 2019 16:11:18 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Asteroids]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[building]]></category>
		<category><![CDATA[building a videoplayer]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[controls]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[How To Build a Video Player With Scrub Control in Unity]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[overview]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[pause]]></category>
		<category><![CDATA[play]]></category>
		<category><![CDATA[playback]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[scrub]]></category>
		<category><![CDATA[scrub control for unity video player]]></category>
		<category><![CDATA[scrubbing]]></category>
		<category><![CDATA[seek]]></category>
		<category><![CDATA[seek with video player]]></category>
		<category><![CDATA[streaming]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[video controls]]></category>
		<category><![CDATA[video pause]]></category>
		<category><![CDATA[video player]]></category>
		<category><![CDATA[video player controls]]></category>
		<category><![CDATA[video ui]]></category>
		<category><![CDATA[videoplayer]]></category>
		<category><![CDATA[videoplayer control]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=591</guid>

					<description><![CDATA[<p>In this tutorial we build our own video player. Complete with play &#38; pause buttons and a nice scrub bar controller. What&#8217;s not to like? 😛 ✅ Download the files and scripts from the tutorial here: oxmond.com/download/tutorials/unity/Oxmond_videoplayer.unitypackage ✅ Download free assets from the Unity Assets...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-build-a-video-player-with-scrub-control-in-unity/">How To Build a Video Player With Scrub Control in Unity!</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this tutorial we build our own video player. Complete with play &amp; pause buttons and a nice scrub bar controller. What&#8217;s not to like? 😛</p>
<hr />
<p>✅ <strong>Download the files and scripts from the tutorial here:<br />
</strong><a href="https://oxmond.com/download/tutorials/unity/Oxmond_videoplayer.unitypackage" target="_blank" rel="noopener noreferrer">oxmond.com/download/tutorials/unity/Oxmond_videoplayer.unitypackage</a></p>
<hr />
<p>✅ <strong>Download free assets from the Unity Assets Store:</strong><br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k" target="_blank" rel="noopener noreferrer">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></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>
<hr />
<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>MyVideoPlayer script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using UnityEngine;
using UnityEngine.Video;
using System.Collections;

public class MyVideoPlayer : MonoBehaviour
{

    public GameObject cinemaPlane;
    public GameObject btnPlay;
    public GameObject btnPause;
    public GameObject knob;
    public GameObject progressBar;
    public GameObject progressBarBG;

    private float maxKnobValue;
    private float newKnobX;
    private float maxKnobX;
    private float minKnobX;
    private float knobPosY;
    private float simpleKnobValue;
    private float knobValue;
    private float progressBarWidth;
    private bool knobIsDragging;
    private bool videoIsJumping = false;
    private bool videoIsPlaying = false;
    private VideoPlayer videoPlayer;
    
    private void Start  ()
    {
        knobPosY = knob.transform.localPosition.y;
        videoPlayer = GetComponent();
        btnPause.SetActive(true);
        btnPlay.SetActive(false);
        videoPlayer.frame = (long)100;
        progressBarWidth = progressBarBG.GetComponent().bounds.size.x;
    }

    private void Update()
    {
        if (!knobIsDragging &amp;&amp; !videoIsJumping)
        {
            if (videoPlayer.frameCount &gt; 0)
            {
                float progress = (float)videoPlayer.frame / (float)videoPlayer.frameCount;
                progressBar.transform.localScale = new Vector3(progressBarWidth * progress, progressBar.transform.localScale.y, 0);
                knob.transform.localPosition = new Vector2(progressBar.transform.localPosition.x + (progressBarWidth * progress), knob.transform.localPosition.y);
            }
        }

        if (Input.GetMouseButtonDown(0))
        {
            Vector3 pos = Input.mousePosition;
            Collider2D hitCollider = Physics2D.OverlapPoint(Camera.main.ScreenToWorldPoint(pos));
            
            if (hitCollider != null &amp;&amp; hitCollider.CompareTag(btnPause.tag))
            {
                BtnPlayVideo();
            }
            if (hitCollider != null &amp;&amp; hitCollider.CompareTag(btnPlay.tag))
            {
                print("playBtn");
                BtnPlayVideo();
            }
        }
    }

    public void KnobOnPressDown()
    {
        VideoStop();
        minKnobX = progressBar.transform.localPosition.x;
        maxKnobX = minKnobX + progressBarWidth;
    }

    public void KnobOnRelease()
    {
        knobIsDragging = false;
        CalcKnobSimpleValue();
        VideoPlay();
        VideoJump();
        StartCoroutine(DelayedSetVideoIsJumpingToFalse());
    }

    IEnumerator DelayedSetVideoIsJumpingToFalse()
    {
        yield return new WaitForSeconds(2);
        SetVideoIsJumpingToFalse();
    }

    public void KnobOnDrag()
    {
        knobIsDragging = true;
        videoIsJumping = true;
        Vector3 curScreenPoint = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
        Vector3 curPosition = Camera.main.ScreenToWorldPoint(curScreenPoint);
        knob.transform.position = new Vector2(curPosition.x, curPosition.y);
        newKnobX = knob.transform.localPosition.x;
        if (newKnobX &gt; maxKnobX) { newKnobX = maxKnobX; }
        if (newKnobX &lt; minKnobX) { newKnobX = minKnobX; }
        knob.transform.localPosition = new Vector2(newKnobX, knobPosY);
        CalcKnobSimpleValue();
        progressBar.transform.localScale = new Vector3(simpleKnobValue * progressBarWidth, progressBar.transform.localScale.y, 0);
    }

    private void SetVideoIsJumpingToFalse()
    {
        videoIsJumping = false;
    }

    private void CalcKnobSimpleValue()
    {
        maxKnobValue = maxKnobX - minKnobX;
        knobValue = knob.transform.localPosition.x - minKnobX;
        simpleKnobValue = knobValue / maxKnobValue;
    }

    private void VideoJump()
    {
        var frame = videoPlayer.frameCount * simpleKnobValue;
        videoPlayer.frame = (long)frame;
    }

    private void BtnPlayVideo()
    {
        if (videoIsPlaying)
        {
            VideoStop();
        }
        else
        {
            VideoPlay();
        }
    }

    private void VideoStop()
    {
        videoIsPlaying = false;
        videoPlayer.Pause();
        btnPause.SetActive(false);
        btnPlay.SetActive(true);
    }

    private void VideoPlay()
    {
        videoIsPlaying = true;
        videoPlayer.Play();
        btnPause.SetActive(true);
        btnPlay.SetActive(false);
    }
}
</pre>
<hr />
<p><strong>The Knob Script:</strong></p>
<pre>using UnityEngine;

// [RequireComponent(typeof(MeshCollider))]
/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

public class Knob : MonoBehaviour
{
    public GameObject videoPlayer;
    private MyVideoPlayer videoPlayerScript;

    void Start()
    {
        videoPlayerScript = videoPlayer.GetComponent();
    }

    void OnMouseDown()
    {
        videoPlayerScript.KnobOnPressDown();
    }

    void OnMouseUp()
    {
        videoPlayerScript.KnobOnRelease();
    }

    void OnMouseDrag()
    {
        videoPlayerScript.KnobOnDrag();
    }

}

</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-build-a-video-player-with-scrub-control-in-unity/">How To Build a Video Player With Scrub Control 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-build-a-video-player-with-scrub-control-in-unity/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Tank Game Basics! How to build, animate and control a tank</title>
		<link>https://oxmond.com/tank-game-basics-how-to-build-animate-and-control-a-tank/</link>
					<comments>https://oxmond.com/tank-game-basics-how-to-build-animate-and-control-a-tank/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Mon, 10 Dec 2018 05:46:32 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2018]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[Animator]]></category>
		<category><![CDATA[beginners]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game making]]></category>
		<category><![CDATA[green]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[red]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[tank]]></category>
		<category><![CDATA[tanks]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Unity3d]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=352</guid>

					<description><![CDATA[<p>Create a small tank game. Learn how to build, animate and control 2D tanks using free assets. Full C# script included. ❤️ Subscribe to Oxmond Tutorials: https://bit.ly/SubscribeOxmondTutorials ✅ Download the free Tank Constructor tool here: https://assetstore.unity.com/packages/2d/textures-materials/tank-constructor-131316?aid=1100l4p9k ✅ Other free Asset Packages at the Unity Assets...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/tank-game-basics-how-to-build-animate-and-control-a-tank/">Tank Game Basics! How to build, animate and control a tank</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Create a small tank game. Learn how to build, animate and control 2D tanks using free assets. Full C# script included.</p>
<hr />
<p><span style="font-weight: 400;"><strong>❤️ Subscribe to Oxmond Tutorials:<br />
</strong><a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></span></p>
<p>✅ Download the free Tank Constructor tool here:<br />
<a href="https://assetstore.unity.com/packages/2d/textures-materials/tank-constructor-131316?aid=1100l4p9k">https://assetstore.unity.com/packages/2d/textures-materials/tank-constructor-131316?aid=1100l4p9k</a></p>
<p><span style="font-weight: 400;"><strong>✅ Other free Asset Packages at the Unity Assets Store:</strong><br />
</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>Tank script:</strong></p>
<pre>/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using UnityEngine;

public class Tank : MonoBehaviour
{

    /////*******************************************/////
    /////                   VARS                    /////  
    /////*******************************************/////

    public Track trackLeft;
    public Track trackRight;

    public string keyMoveForward;
    public string keyMoveReverse;
    public string keyRotateRight;
    public string keyRotateLeft;

    bool moveForward = false;
    bool moveReverse = false;
    float moveSpeed = 0f;
    float moveSpeedReverse = 0f;
    float moveAcceleration = 0.1f;
    float moveDeceleration = 0.20f;
    float moveSpeedMax = 2.5f;

    bool rotateRight = false;
    bool rotateLeft = false;
    float rotateSpeedRight = 0f;
    float rotateSpeedLeft = 0f;
    float rotateAcceleration = 4f;
    float rotateDeceleration = 10f;
    float rotateSpeedMax = 130f;


    /////*******************************************/////
    /////                 UPDATE                    /////  
    /////*******************************************/////

    void Update()
    {

        rotateLeft = (Input.GetKeyDown(keyRotateLeft)) ? true : rotateLeft;
        rotateLeft = (Input.GetKeyUp(keyRotateLeft)) ? false : rotateLeft;
        if (rotateLeft)
        {
            rotateSpeedLeft = (rotateSpeedLeft &lt; rotateSpeedMax) ? rotateSpeedLeft + rotateAcceleration : rotateSpeedMax; } else { rotateSpeedLeft = (rotateSpeedLeft &gt; 0) ? rotateSpeedLeft - rotateDeceleration : 0;
        }
        transform.Rotate(0f, 0f, rotateSpeedLeft * Time.deltaTime);

        rotateRight = (Input.GetKeyDown(keyRotateRight)) ? true : rotateRight;
        rotateRight = (Input.GetKeyUp(keyRotateRight)) ? false : rotateRight;
        if (rotateRight)
        {
            rotateSpeedRight = (rotateSpeedRight &lt; rotateSpeedMax) ? rotateSpeedRight + rotateAcceleration : rotateSpeedMax; } else { rotateSpeedRight = (rotateSpeedRight &gt; 0) ? rotateSpeedRight - rotateDeceleration : 0;
        }
        transform.Rotate(0f, 0f, rotateSpeedRight * Time.deltaTime * -1f);

        moveForward = (Input.GetKeyDown(keyMoveForward)) ? true : moveForward;
        moveForward = (Input.GetKeyUp(keyMoveForward)) ? false : moveForward;
        if (moveForward)
        {
            moveSpeed = (moveSpeed &lt; moveSpeedMax) ? moveSpeed + moveAcceleration : moveSpeedMax; } else { moveSpeed = (moveSpeed &gt; 0) ? moveSpeed - moveDeceleration : 0;
        }
        transform.Translate(0f, moveSpeed * Time.deltaTime, 0f);

        moveReverse = (Input.GetKeyDown(keyMoveReverse)) ? true : moveReverse;
        moveReverse = (Input.GetKeyUp(keyMoveReverse)) ? false : moveReverse;
        if (moveReverse)
        {
            moveSpeedReverse = (moveSpeedReverse &lt; moveSpeedMax) ? moveSpeedReverse + moveAcceleration : moveSpeedMax; } else { moveSpeedReverse = (moveSpeedReverse &gt; 0) ? moveSpeedReverse - moveDeceleration : 0;
        }
        transform.Translate(0f, moveSpeedReverse * Time.deltaTime * -1f, 0f);

        if (moveForward | moveReverse | rotateRight | rotateLeft)
        {
            trackStart();
        }
        else
        {
            trackStop();
        }

    }

    /////*******************************************/////
    /////                METHODS                    /////  
    /////*******************************************/////

    void trackStart()
    {
        trackLeft.animator.SetBool("isMoving", true);
        trackRight.animator.SetBool("isMoving", true);
    }

    void trackStop()
    {
        trackLeft.animator.SetBool("isMoving", false);
        trackRight.animator.SetBool("isMoving", false);
    }

}


</pre>
<p><strong>Tracks script:</strong></p>
<pre>/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Track : MonoBehaviour {

    public Animator animator;

}

</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/tank-game-basics-how-to-build-animate-and-control-a-tank/">Tank Game Basics! How to build, animate and control a tank</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/tank-game-basics-how-to-build-animate-and-control-a-tank/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to control a cube with the arrow keys</title>
		<link>https://oxmond.com/how-to-control-a-cube-with-the-arrow-keys/</link>
					<comments>https://oxmond.com/how-to-control-a-cube-with-the-arrow-keys/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Fri, 23 Nov 2018 15:52:48 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2018]]></category>
		<category><![CDATA[arrow keys]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[beginners]]></category>
		<category><![CDATA[blue]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game making]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[red]]></category>
		<category><![CDATA[small game]]></category>
		<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=304</guid>

					<description><![CDATA[<p>The most basic tutorial of all tutorials: How to move a cube with the arrow keys.If you are new to Unity, this is a good place to start. ❤️ Subscribe to Oxmond Tutorials:https://bit.ly/SubscribeOxmondTutorials 😷👕 Need a face mask / developer T-shirt? Drop by our shop...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-control-a-cube-with-the-arrow-keys/">How to control a cube with the arrow keys</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The most basic tutorial of all tutorials: How to move a cube with the arrow keys.<br />If you are new to Unity, this is a good place to start.</p>
<hr />
<p><strong><span style="font-weight: 400;">❤️ <strong>Subscribe to Oxmond Tutorials:</strong><br /><a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></span><br /></strong></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>Cube script:</strong></p>
<pre>/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Cube : MonoBehaviour {

	void Update () {      
             transform.Translate(Input.GetAxis("Horizontal") * Time.deltaTime * 15f,0f,0f);		
             transform.Translate(0f,0f, Input.GetAxis("Vertical") * Time.deltaTime * 15f);		
	}
}


</pre>

<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-control-a-cube-with-the-arrow-keys/">How to control a cube with the arrow keys</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-control-a-cube-with-the-arrow-keys/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to control an animated 2D helicopter sprite with the mouse</title>
		<link>https://oxmond.com/how-to-control-an-animated-2d-helicopter-sprite-with-the-mouse-unity-c-tutorial-for-beginners/</link>
					<comments>https://oxmond.com/how-to-control-an-animated-2d-helicopter-sprite-with-the-mouse-unity-c-tutorial-for-beginners/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Tue, 20 Nov 2018 00:04:34 +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[coding pirates]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game making 2D]]></category>
		<category><![CDATA[helicopter]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorials]]></category>
		<guid isPermaLink="false">https://demo.oxmond.com/?p=224</guid>

					<description><![CDATA[<p>Unity beginner tutorial. Learn how to animate and control a 2D sprite using only mouse input. ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game: https://bit.ly/SubscribeOxmondTutorials ✅ Download free helicopter animation sprites here: http://paulmakegames.blogspot.com/2017/04/attack-helicopter-animated-sprite.html (by Paul Chin) ✅ Download Unity here: https://unity3d.com/get-unity/download 🎵 Music...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-control-an-animated-2d-helicopter-sprite-with-the-mouse-unity-c-tutorial-for-beginners/">How to control an animated 2D helicopter sprite with the mouse</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Unity beginner tutorial. Learn how to animate and control a 2D sprite using only mouse input.</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>✅ <strong>Download free helicopter animation sprites here:</strong><br />
<a href="http://paulmakegames.blogspot.com/2017/04/attack-helicopter-animated-sprite.html">http://paulmakegames.blogspot.com/2017/04/attack-helicopter-animated-sprite.html</a> (by Paul Chin)</p>
<p>✅ <strong>Download Unity here:</strong><br />
<a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://unity3d.com/get-unity/download" rel="nofollow">https://unity3d.com/get-unity/download</a></p>
<p>🎵 <strong>Music by:</strong><br />
Max McFerren</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>Helicopter script:</strong></p>
<pre>/* .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © OXMOND / www.oxmond.com */

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Helicopter : MonoBehaviour {

	void Update () {

        if (Input.GetMouseButton(0))
        {
            transform.Translate(0f, 0.1f, 0f);
        }
        else {
            transform.Translate(0f, -0.1f, 0f);
        }
		
	}
}
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-control-an-animated-2d-helicopter-sprite-with-the-mouse-unity-c-tutorial-for-beginners/">How to control an animated 2D helicopter sprite with 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-control-an-animated-2d-helicopter-sprite-with-the-mouse-unity-c-tutorial-for-beginners/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
