public Search(Ship inShip) { ship = inShip; fleetManager = ship.manager; beacon = GameObject.Instantiate(Resources.Load("Ai Objects/SearchBeacon")) as GameObject; beacon.name = "Beacon_Flee_" + ship.gameObject.name; //Debug.Log(beacon.name); beaconScript = beacon.GetComponent<BeaconScript>(); beaconScript.SetOwner(ship); RenewBeacon(); ship.SetTargetTransform(beacon.transform); if(ship.photonView.isMine) ship.photonView.RPC("SearchRPC", PhotonTargets.Others, beacon.transform.position); //Debug.Log("Beacon / Search Initialized"); }
private void CreateBeacon() { beacon = GameObject.Instantiate(Resources.Load("Ai Objects/SearchBeacon")) as GameObject; beaconScript = beacon.GetComponent<BeaconScript>(); beaconScript.SetOwner(ship); RenewBeacon(); }