// Start is called before the first frame update void Start() { bot = GetComponent <BotControlScript>(); AIClient.instance.AddAgent(this); data = new AIObjectSendModel(); data.agentId = id; }
void Start() { // initialising references standardPos = GameObject.Find("CamPos").transform; if (GameObject.Find("LookAtPos")) lookAtPos = GameObject.Find("LookAtPos").transform; // finding the BotControlScript on the root parent of the character botCtrl = character.root.GetComponent<BotControlScript>(); }
private bool shot; // a toggle for when we have shot the laser void Start() { // creating the two line renderers to initialise our variables laserL = new LineRenderer(); laserR = new LineRenderer(); // initialising eye positions EyeL = transform.Find("EyeL"); EyeR = transform.Find("EyeR"); // finding the BotControlScript on the root parent of the character botCtrl = GameObject.Find("Robot2").GetComponent <BotControlScript>(); // setting up the audio component GetComponent <AudioSource>().loop = true; GetComponent <AudioSource>().playOnAwake = false; }
private bool shot; // a toggle for when we have shot the laser #endregion Fields #region Methods void Start() { // creating the two line renderers to initialise our variables laserL = new LineRenderer(); laserR = new LineRenderer(); // initialising eye positions EyeL = transform.Find("EyeL"); EyeR = transform.Find("EyeR"); // finding the BotControlScript on the root parent of the character botCtrl = transform.root.GetComponent<BotControlScript>(); // setting up the audio component audio.loop = true; audio.playOnAwake = false; }
void Start() { // initialising reference variables anim = gameObject.GetComponent <Animator>(); col = gameObject.GetComponent <CapsuleCollider>(); if (anim.layerCount == 2) { anim.SetLayerWeight(1, 1); } manager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager> (); player = manager.Player; movingTarget = player; playerScript = player.GetComponent <BotControlScript> (); }
void Start() { // creating the two line renderers to initialise our variables laserL = new LineRenderer(); laserR = new LineRenderer(); // initialising eye positions EyeL = transform.Find("EyeL"); EyeR = transform.Find("EyeR"); // finding the BotControlScript on the root parent of the character botCtrl = transform.root.GetComponent <BotControlScript>(); //zc1415926 isLaserEnable = botCtrl.isLaserEnable; // setting up the audio component audio.loop = true; audio.playOnAwake = false; }
void Start() { // initialising reference variables anim = gameObject.GetComponent<Animator>(); col = gameObject.GetComponent<CapsuleCollider>(); if(anim.layerCount ==2) anim.SetLayerWeight(1, 1); manager = GameObject.FindGameObjectWithTag ("GameManager").GetComponent<GameManager> (); player = manager.Player; movingTarget = player; playerScript = player.GetComponent<BotControlScript> (); }
// Use this for initialization void Start() { botCtrl = player.GetComponent<BotControlScript>(); }