Benim C# bilgim olmadığından Unity'den FreeAI adlı scripti indirdim ama çalışmıyor herşeyi ayarlıyorum sonra oyuna giriyorum model put gibi duruyor lütfen yardım edin...
Script; using UnityEngine; using System.Collections; using System.Collections.Generic;
public class FreeAI : MonoBehaviour { //THE CHARACTER COLLISION LAYER FOR TARGETS public Transform AICharacter;
public int CharacterCollisionLayer=15; //ENABLES MELEE COMBAT public bool EnableCombat=true; //THE TARGET WHICH HE FOLLOWS AND ATTACKS public Transform Target; //THE VECTOR OF THE TARGET private Vector3 CurrentTarget; //TARGET VISIBIL BOOL private bool TargetVisible; private bool MoveToTarget; //SPEED WHICH THE AI TURNS public float turnspeed=5; //SPEED WHICH AI RUNS public float runspeed=4; public float Damage=10; public float AttackSpeed=1; public float AttackRange=5;
//WHEN THE DAMAGE HAS BEEN DEALT private bool damdealt;
//ANIMATIONS public AnimationClip RunAnimation; public AnimationClip IdleAnimation; public AnimationClip AttackAnimation; public AnimationClip DeathAnimation; private bool stop; private bool Swing; public bool IsDead; private bool DeadPlayed;
private float Atimer; private bool startfollow; //PATHFINDING STUFF public bool EnableFollowNodePathFinding; public bool DebugShowPath; public float DistanceNodeChange=1.5f; public List<Vector3> Follownodes; private int curf;
// Use this for initialization void Start () { if(AICharacter){} else AICharacter=transform;
}
// Update is called once per frame void Update () {