Пример #1
0
    void Update()
    {
        if (canTalk)
        {
            if (Input.GetKeyDown(KeyCode.F))
            {
                facade.OnCarpenterTalk();
                transform.Find("Talk").GetComponent <Animator>().SetTrigger("Talk");
                facade.ChangeMovable(false);
                canTalk = false;
                DOTween.To(() => timeCount, a => timeCount = a, 1, 7).OnComplete(delegate()
                {
                    facade.ChangeMovable(true);
                    canTalk = true;
                });
            }
        }

        if (canTake_bg03)
        {
            GameObject     go    = facade.GetPresentGO();
            SpriteRenderer plank = go.transform.Find("Plank").GetComponent <SpriteRenderer>();
            if (Input.GetKeyDown(KeyCode.F))
            {
                plank.sprite = null;
                facade.PickUpPlank();
                canTake_bg03 = false;
                MissionIndex = 1;
            }
        }
    }