• 状态机高阶讲解-16


    2534
    01:44:41,942 --> 01:44:44,140
    那我们,你看这里

    2535
    01:44:45,170 --> 01:44:46,452
    你看这里改之后

    2536
    01:44:46,452 --> 01:44:48,833
    它代码就做新的调整了嘛

    2537
    01:44:48,833 --> 01:44:49,200
    对吧

    2538
    01:44:50,150 --> 01:44:51,180
    调整

    2539
    01:44:51,460 --> 01:44:52,189
    同样的

    2540
    01:44:52,189 --> 01:44:54,740
    我们也试一下,这些有没有问题

    2541
    01:44:54,740 --> 01:44:57,110
    我们敲的代码有没有没问题

    2542
    01:44:57,890 --> 01:44:59,369
    还有这个操作

    2543
    01:44:59,369 --> 01:45:00,637
    有没有问题

    2544
    01:45:00,637 --> 01:45:01,060
    生成

    2545
    01:45:08,520 --> 01:45:08,814


    2546
    01:45:08,814 --> 01:45:11,760
    这里面它说什么那个

    2547
    01:45:12,430 --> 01:45:13,360


    2548
    01:45:16,020 --> 01:45:20,470
    这个print里面缺少在什么前面

    2549
    01:45:20,750 --> 01:45:21,005


    2550
    01:45:21,005 --> 01:45:23,302
    非法命名空间字符

    2551
    01:45:23,302 --> 01:45:25,598
    那这里有问题了

    2552
    01:45:25,598 --> 01:45:25,854


    2553
    01:45:25,854 --> 01:45:27,130
    刚才我们

    2554
    01:45:27,520 --> 01:45:27,860


    2555
    01:45:27,860 --> 01:45:29,560
    敲错了,是吧

    2556
    01:45:33,180 --> 01:45:33,358


    2557
    01:45:33,358 --> 01:45:35,500
    这个地方,看什么地方有问题

    2558
    01:45:40,020 --> 01:45:40,255


    2559
    01:45:40,255 --> 01:45:41,900
    少了个冒号

    2560
    01:45:43,190 --> 01:45:44,380


    2561
    01:45:46,390 --> 01:45:47,700
    这个地方

    2562
    01:45:47,700 --> 01:45:50,320
    看有没有问题

    2563
    01:45:50,600 --> 01:45:50,817

    2564
    01:45:50,817 --> 01:45:51,470
    确定

    2565
    01:45:51,470 --> 01:45:52,559
    再来一遍

    2566
    01:45:52,559 --> 01:45:53,430
    再来一遍

    2567
    01:46:08,900 --> 01:46:09,140

    2568
    01:46:09,140 --> 01:46:10,100
    构建完成

    2569
    01:46:10,100 --> 01:46:11,540
    你看,已搞定

    2570
    01:46:11,540 --> 01:46:14,660
    就是说,这个对象已经生成了

    2571
    01:46:14,970 --> 01:46:16,570
    已搞定这个地方

    2572
    01:46:18,270 --> 01:46:22,852
    那么接下来呢,就要给它添加状态机了

    2573
    01:46:22,852 --> 01:46:24,200
    怎么添加

    2574
    01:46:24,630 --> 01:46:24,889


    2575
    01:46:24,889 --> 01:46:26,702
    右键点这个类了

    2576
    01:46:26,702 --> 01:46:27,220


    2577
    01:46:28,330 --> 01:46:31,220
    新增,状态图,这里

    2578
    01:46:35,470 --> 01:46:36,330

    2579
    01:46:36,610 --> 01:46:39,260
    得到一张空白的状态图了

    2580
    01:46:40,140 --> 01:46:42,546
    那首先要放上一个状态

    2581
    01:46:42,546 --> 01:46:45,610
    你看,工具栏这里,状态,点中这个

    2582
    01:46:47,210 --> 01:46:49,550
    按住Ctrl,滚轮放大一点

    2583
    01:46:50,110 --> 01:46:50,374


    2584
    01:46:50,374 --> 01:46:52,223
    状态名字我们叫

    2585
    01:46:52,223 --> 01:46:53,280
    比如说,叫

    2586
    01:46:54,120 --> 01:46:55,020
    Active

    2587
    01:46:58,620 --> 01:46:59,630
    活跃的

    2588
    01:47:00,830 --> 01:47:01,134

    2589
    01:47:01,134 --> 01:47:02,353
    这个有了

    2590
    01:47:02,353 --> 01:47:05,400
    那我们再加一个缺省的

    2591
    01:47:06,570 --> 01:47:07,131
    转换

    2592
    01:47:07,131 --> 01:47:08,440
    它这里叫转换

    2593
    01:47:08,440 --> 01:47:10,310
    我们平时叫迁移

    2594
    01:47:13,150 --> 01:47:13,889
    点中这个

    2595
    01:47:13,889 --> 01:47:15,922
    但是你看,点这里的话

    2596
    01:47:15,922 --> 01:47:17,585
    它不出现一个黑点

    2597
    01:47:17,585 --> 01:47:19,434
    EA里面是什么

    2598
    01:47:19,434 --> 01:47:20,543
    点这里出现黑点

    2599
    01:47:20,543 --> 01:47:21,467
    然后再拉过来

    2600
    01:47:21,467 --> 01:47:23,130
    它这个,点不行的

    2601
    01:47:23,130 --> 01:47:23,870
    你还得指向

    2602
    01:47:24,150 --> 01:47:27,686
    某个,指向认定这个是

    2603
    01:47:27,686 --> 01:47:30,211
    这是缺省状态

    2604
    01:47:30,211 --> 01:47:31,980
    点中这个才有

    2605
    01:47:32,820 --> 01:47:33,079

    2606
    01:47:33,079 --> 01:47:36,450
    就得到了一个缺省的迁移了

    2607
    01:47:39,030 --> 01:47:41,820
    那我们就要对这个缺省的迁移

    2608
    01:47:43,540 --> 01:47:44,670

    2609
    01:47:46,640 --> 01:47:50,320
    配置一下迁移的内容

    2610
    01:47:50,770 --> 01:47:56,933
    那就是进入这个初始的这个缺省状态的时候

    2611
    01:47:56,933 --> 01:47:59,399
    我们先设置这个属性

    2612
    01:47:59,399 --> 01:48:00,632
    属性是哪个

    2613
    01:48:00,632 --> 01:48:02,851
    是count那个

    2614
    01:48:02,851 --> 01:48:05,070
    这个属性嘛

    2615
    01:48:07,370 --> 01:48:08,930
    设这个属性的值

    2616
    01:48:09,210 --> 01:48:09,477


    2617
    01:48:09,477 --> 01:48:10,280
    比如说

    2618
    01:48:11,880 --> 01:48:12,947
    怎么设置

    2619
    01:48:12,947 --> 01:48:15,082
    你看双击这个迁移

    2620
    01:48:15,082 --> 01:48:16,150
    然后这里

    2621
    01:48:19,590 --> 01:48:21,091
    在这个地方

    2622
    01:48:21,091 --> 01:48:22,163
    这里叫操作

    2623
    01:48:22,163 --> 01:48:23,236
    这个不对的

    2624
    01:48:23,236 --> 01:48:24,952
    应该是动作,action

    2625
    01:48:24,952 --> 01:48:27,525
    所以这个翻译是有问题的

    2626
    01:48:27,525 --> 01:48:32,030
    可能是他们IBM中国公司的人翻译的这个

    2627
    01:48:32,720 --> 01:48:34,724
    不知道找什么人翻译的

    2628
    01:48:34,724 --> 01:48:35,560
    不知道了

    2629
    01:48:35,970 --> 01:48:36,181


    2630
    01:48:36,181 --> 01:48:37,452
    这是action

    2631
    01:48:37,452 --> 01:48:40,630
    它把它跟operation混在一起了

    2632
    01:48:42,700 --> 01:48:42,942


    2633
    01:48:42,942 --> 01:48:44,636
    比如说,我们代码

    2634
    01:48:44,636 --> 01:48:47,300
    count

    2635
    01:48:48,000 --> 01:48:49,252
    =10

    2636
    01:48:49,252 --> 01:48:51,130
    一开始是10嘛

    2637
    01:48:52,790 --> 01:48:54,070


    2638
    01:48:54,630 --> 01:48:54,935

    2639
    01:48:54,935 --> 01:48:55,241


    2640
    01:48:55,241 --> 01:48:56,770
    然后呢

    2641
    01:48:57,050 --> 01:48:58,000
    print 

    2642
    01:49:00,710 --> 01:49:01,057


    2643
    01:49:01,057 --> 01:49:02,100
    已开始

    2644
    01:49:03,020 --> 01:49:03,950


    2645
    01:49:08,690 --> 01:49:08,882


    2646
    01:49:08,882 --> 01:49:09,650
    类似这样

    2647
    01:49:11,470 --> 01:49:12,230

    2648
    01:49:12,230 --> 01:49:12,990
    OK 

  • 相关阅读:
    使用scp把另外一台服务器上的文件夹/文件拷贝到当前服务器
    《FPGA原理与结构》读书笔记(0)-基础知识
    Winform UI界面设计例程——多线程访问UI控件
    SQL语句之like操作符
    第一次写计算机论文无从下手怎么办?(一) - 易智编译easeediting
    自回归滞后模型进行多变量时间序列预测
    logback 日志基础配置
    设计模式:策略模式和工厂模式混合使用
    Context与Reducer
    Java“牵手”ebay商品详情数据,ebay商品详情API接口,ebayAPI接口申请指南
  • 原文地址:https://blog.csdn.net/rolt/article/details/137421959