Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        socketEquipment = GetComponent<SocketEquipment>();
        botControl = GetComponent<FSMBotController>();
        //player = GameObject.FindWithTag("Player");
        player = botControl.playerTransform;
        thisBody = GetComponent<Rigidbody>();
        energyControl = GetComponent<EnergyController>();

        flipperCooldownTimers = new float[Enum.GetNames(typeof(SocketLocation)).Length];
        hammerCooldownTimers = new float[Enum.GetNames(typeof(SocketLocation)).Length];
        SawHoldTimers = new float[Enum.GetNames(typeof(SocketLocation)).Length];
    }
Ejemplo n.º 2
0
    void Start()
    {
        controller = GetComponent<BotVehicleController>();
        botRigidbody = GetComponent<Rigidbody>();
        botHealth = GetComponent<PlayerHealth>();

        // Start bot in patrol mode:
        state = FSMState.PATROL;

        if (playerTransform == null)
            playerTransform = GameObject.FindWithTag("Player").GetComponent<Transform>();

        playerHealth = playerTransform.GetComponent<PlayerHealth>();
        playerEquip = playerTransform.GetComponent<SocketEquipment>();

        path = new NavMeshPath();

        goToRandomPosition();
    }