// Use this for initialization
 void Start()
 {
     BC = gameObject.GetComponent <BotController2>();
     if (BC == null)
     {
         throw new NullReferenceException("bc is null");
     }
 }
예제 #2
0
    // 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);
    }
예제 #3
0
    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;
         * }*/
    }
예제 #4
0
 // Use this for initialization
 void Start()
 {
     BC = GetComponent <BotController2>();
     _wayPointListLength = GameManager2.Instance._lwayPointList.Count;
     _wayPointCounter    = UnityEngine.Random.Range(0, _wayPointListLength);
 }