Commit 53ba17aa authored by Cody A Burchett's avatar Cody A Burchett

enemy prefabs

parent fbbcb8fa
......@@ -35,6 +35,9 @@ public class BaseEnemy : MonoBehaviour {
RaycastHit2D hitSide = Physics2D.Raycast(collisionPos, dir, .1f);
RaycastHit2D hitDown = Physics2D.Raycast(collisionPos, -transform.up, .1f);
Debug.DrawRay(collisionPos, dir,;
Debug.DrawRay(collisionPos, -transform.up,;
if (hitDown.collider != null && hitSide.collider == null)
return true;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VerticalEnemy : BaseEnemy {
public bool leftWall;
void Update()
//find collision direction and position of enemy
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment