Пример #1
0
    public void Interact()
    {
        BoolVariable boolVariable = (BoolVariable)bc.GetBlackboardValue(blackboardEventName);

        boolVariable.value = !boolVariable.value;
        bc.TriggerEvent(blackboardEventName);
    }
    // Start is called before the first frame update
    void Start()
    {
        bc                 = GameObject.FindWithTag("BlackboardController").GetComponent <BlackboardController>();
        playerStats        = (PlayerStatsVariable)bc.GetBlackboardValue("PlayerStats");
        transform.position =
            new Vector3(playerStats.playerPosition.x, transform.position.y, playerStats.playerPosition.z);

        cc  = GetComponent <CharacterController>();
        cam = Camera.main.transform;
    }
Пример #3
0
    // Start is called before the first frame update
    private void Start()
    {
        closedPos = transform.position;
        openPos   = closedPos - new Vector3(2f, 0f, 0f);
        bc        = GameObject.FindWithTag("BlackboardController").GetComponent <BlackboardController>();

        bc.StartListening(blackboardEventName, OnDoorToggle);

        OnDoorToggle(bc.GetBlackboardValue(blackboardEventName));
    }