// Use this for initialization void Start() { BC = gameObject.GetComponent <BotController2>(); if (BC == null) { throw new NullReferenceException("bc is null"); } }
// Use this for initialization void Start() { BC = gameObject.GetComponent <BotController2>(); if (BC == null) { throw new NullReferenceException("bc is null"); } lineRenderer = gameObject.AddComponent <LineRenderer>(); lineRenderer.SetPositions(gunBeam); lineRenderer.SetWidth(gunWidth, gunWidth); }
public override void OnInspectorGUI() { //base.OnInspectorGUI(); DrawDefaultInspector(); BotController2 bot = (BotController2)target; if (GUILayout.Button("Take Damage")) { bot.Health -= 60; } /*if (GUILayout.Button("Drain Ammo")) * { * bot.AmmoAmount -= 10; * }*/ }
// Use this for initialization void Start() { BC = GetComponent <BotController2>(); _wayPointListLength = GameManager2.Instance._lwayPointList.Count; _wayPointCounter = UnityEngine.Random.Range(0, _wayPointListLength); }