Пример #1
0
    private void OnPlayerGesture(long userid, string gesture)
    {
        if (userid == PlayerManager.Instance.GetPrimaryPlay().UserID)
        {
            switch (gesture)
            {
            case "右挥手":
                ContentGroup.DOLocalMoveX(-1100, 0.5f).Ease(TweenType.EaselnOutBack).OnComplete(() =>
                {
                    for (int i = 0; i < ContentRawImage.Count; i++)
                    {
                        ContentRawImage[i].enabled = false;
                    }
                    ContentGroup.localPosition = Vector3.zero;
                    SetContent(1);
                });
                break;

            case "左挥手":
                ContentGroup.DOLocalMoveX(1100, 0.5f).Ease(TweenType.EaselnOutBack).OnComplete(() =>
                {
                    for (int i = 0; i < ContentRawImage.Count; i++)
                    {
                        ContentRawImage[i].enabled = false;
                    }
                    ContentGroup.localPosition = Vector3.zero;
                    SetContent(-1);
                });
                break;
            }
        }
    }