// Use this for initialization void Start() { BeamParam Parent = this.transform.root.gameObject.GetComponent <BeamParam>(); if (Parent == null) { return; } BeamLine BL = this.gameObject.GetComponent <BeamLine>(); BL.BeamColor = Parent.BeamColor; BL.StartSize = Parent.Scale * 0.5f; BL.AnimationSpd = Parent.AnimationSpd; BL.MaxLength = Parent.MaxLength; }
// Use this for initialization void Start() { BL = (BeamLine)this.gameObject.transform.FindChild("BeamLine").GetComponent<BeamLine>(); BP = this.transform.root.gameObject.GetComponent<BeamParam>(); }
// Use this for initialization void Start () { BL = (BeamLine)this.gameObject.transform.Find("BeamLine").GetComponent<BeamLine>(); BP = this.transform.root.gameObject.GetComponent<BeamParam>(); }
// Use this for initialization void Start() { BL = (BeamLine)this.gameObject.transform.FindChild("BeamLine").GetComponent <BeamLine>(); BP = this.transform.root.gameObject.GetComponent <BeamParam>(); whoshooting = GameObject.Find("Player"); }