Game Dev Enemies

Channel:
Subscribers:
1,060
Published on ● Video Link: https://www.youtube.com/watch?v=dPToY5H8fos



Duration: 9:55
6 views
0


The 3nd part of this series, the 2st part is located here

How to Shoot
https://youtu.be/unn1JxXzAz0

How to Move
https://youtu.be/ZiCMUGOE2k0

Down below is the code

Enemy Move

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Target1 : MonoBehaviour
{
public float speed;
public bool MoveLeft;

void Update ()
{ if(MoveLeft)
{
transform.Translate(-2 * Time.deltaTime * speed, 0, 0);
}


}

void OnTriggerEnter2D(Collider2D hitObject)
{
if (hitObject.tag == "Player") { Destroy(gameObject); }
}







Tags:
Game
Gamedev
C++
Unity
Simple
MovementScript
MovinginUnity
GameDev
Dev
IndieGameDev
Visual
Visualstudios
simplemovementscripts
simple movement scripts
moving in c++
Transform
Transform.position
Game Dev
Game Devolpment
Shooting
bulletsinunity
unityenemies
enemymovement