protected override void Start()
        {
            base.Start();

            pm = GetComponent <BotMovement>();
            ph = GetComponent <BotHealth>();
            ps = GetComponentInChildren <BotShooting>();

            lastPos = transform.position;
            InvokeRepeating("Incentive", 0, 2.5f);

            maxDistance = ps.range;

            d = new float[rayCount];
            e = new float[rayCount];

            input = new float[1, d.Length + e.Length + 2];
        }
コード例 #2
0
        BotShooting playerShooting;                              // Reference to the PlayerShooting script.


        protected override void Awake()
        {
            base.Awake();
            playerMovement = GetComponent <BotMovement> ();
            playerShooting = GetComponentInChildren <BotShooting> ();
        }