Exemple #1
0
 public void Init(GameObject gameObject)
 {
     followAI = new FollowAI((MovingEntity)gameObject,
                             gameObject.GetOrAddCustomProperty <string>("TargetID", SimulationGame.Player.ID),
                             gameObject.GetOrAddCustomProperty <float>("Distance", 50.0f),
                             gameObject.GetOrAddCustomProperty <float>("TeleportDistance", WorldGrid.BlockSize.X * 32));
 }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     folower           = GameObject.FindWithTag("FolowAI");
     folowing          = GameObject.FindWithTag("Player").transform;
     waypoint1         = Instantiate(waypoint);
     scriptAI          = folower.GetComponent(typeof(FollowAI)) as FollowAI;
     scriptAI.waypoint = waypoint1.transform;
     scriptAI.player   = folowing.transform;
     script            = waypoint1.GetComponent(typeof(WaypointNext)) as WaypointNext;
     script.enemy      = folower.GetComponent(typeof(FollowAI)) as FollowAI;
 }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     AI = FindObjectOfType <FollowAI>();
 }
 public override void Start()
 {
     base.Start();
     followAI = transform.GetComponent <FollowAI>();
     roamAI   = transform.GetComponent <RoamAI>();
 }