21 lines
401 B
C#
21 lines
401 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class RightLeftAI : MonoBehaviour
|
|||
|
{
|
|||
|
private AbstractCharacter _character;
|
|||
|
|
|||
|
void Start()
|
|||
|
{
|
|||
|
_character = GetComponentInParent<AbstractCharacter>();
|
|||
|
_character.Move(Vector2.left);
|
|||
|
}
|
|||
|
|
|||
|
// Update is called once per frame
|
|||
|
void Update()
|
|||
|
{
|
|||
|
_character.Shoot();
|
|||
|
}
|
|||
|
}
|