// Use this for initialization void Start() { gWorld = GameObject.Find("GameController").GetComponent<GhostWorldController>(); mat = GetComponent<Renderer>().material; mat.mainTexture = text; mat.color = new Color (mat.color.r, mat.color.g, mat.color.b, 0); }
// Use this for initialization void Start() { activateSource = gameObject.AddComponent<AudioSource> (); activateSource.clip = activateSound; activateSource.playOnAwake = false; ghostCtrl = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GhostWorldController> (); particles = transform.GetComponentsInChildren<ParticleSystem> (); lights = transform.GetComponentsInChildren<Light> (); }
// Use this for initialization void Start() { trapCtrl = transform.parent.gameObject.GetComponent<TrapController>(); ghostCtrl = GameObject.Find("GameController").GetComponent<GhostWorldController>(); player = GameObject.FindGameObjectWithTag("Player"); disarm = transform.Find("Disarm").GetComponent<TrapDisarm>(); }
public override void Start(AI ai) { base.Start (ai); self = ai.WorkingMemory.GetItem<GameObject> ("self"); aiHealthControl = self.GetComponent<HealthController> (); ghostController = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GhostWorldController> (); lastHealth = aiHealthControl.getCurrentHealth (); gui = self.GetComponent<DebugAP> (); //TODO var eCont = self.GetComponent<EquipmentController> (); if (eCont != null) selfAtkRng = eCont.GetWeaponRange (); //rand = new Random(); }