Enemy shooting at player Unity2D

I’m trying to make it so that my enemy AI can shoot at and target the player in a 2D game. I get the errors:

Assets/Meep/Dialogues/enemyshoot.cs(21,35): error CS0118: enemyshoot.Projectile' is a field’ but a ‘type’ was expected

Assets/Meep/Dialogues/enemyshoot.cs(22,28): error CS1061: Type object' does not contain a definition for instantiate’ and no extension method instantiate' of type object’ could be found (are you missing a using directive or an assembly reference?)

This is my current script:

using UnityEngine;
using System.Collections;

public class enemyshoot : MonoBehaviour {
	public GameObject _controller;
	private Vector2 _direction;
	private Vector2 _startPosition;
	private float _canFireIn;
	public GameObject Projectile;
	public void Start (){
		//_controller = GetComponent<>();
		_direction = new Vector2(-1, 0);
		_startPosition = transform.position;
	public void Update() {
		if ((_canFireIn -= Time.deltaTime) > 0)
		var raycast = Physics2D.Raycast(transform.position, _direction, 10, 1 << LayerMask.NameToLayer("Player"));
		if (!raycast)
		var projectile = (Projectile) Instantiate(Projectile, transform.position, transform.rotation);
		projectile.instantiate(gameObject, _direction, _controller.Velocity);
		//_canFireIn = FireRate;

The problem is that you have a class called Projectile and therefore cannot declare a variable with the name Projectile. Simply changing that to projectile wiwthout the capital P will fix the first error. In line 21 and 9.

I can’t tell if you have an instantiate method iside the Projectile class. But from the error, you seem not to have one. What are you trying to achieve in line 22?