コード例 #1
0
    private void OnTweenComplete(object param)
    {
        GalleryScreen gs = param as GalleryScreen;

        gs.GetLastItem();
        //do something
        gs.ReserveState("GalleryLocked");
    }
コード例 #2
0
    public override void Excute(FageStateMachine stateMachine)
    {
        base.Excute(stateMachine);
        GalleryScreen gs = stateMachine as GalleryScreen;

        if (gs.IsDragging())
        {
            gs.ReserveState("GalleryDragging");
        }
    }
コード例 #3
0
    public override void Excute(FageStateMachine stateMachine)
    {
        base.Excute(stateMachine);
        GalleryScreen gs = stateMachine as GalleryScreen;

        if (!gs.IsDragging())
        {
            RectTransform rt = gs.GetNearestItem();

            /**
             * something
             */
            switch (Random.Range(1, 3))
            {
            case 1:
                gs.ReserveState("GalleryUnlocked");
                break;

            case 2:
                gs.ReserveState("GalleryLocked");
                break;
            }
        }
    }