Project1
标题:
self.active等的区别
[打印本页]
作者:
蜂蜜蚂蚁
时间:
2009-3-19 18:56
标题:
self.active等的区别
1、if self.active
Window_Selectable里 129行
def update
super
# 可以移动光标的情况下
if self.active and @item_max > 0 and @index >= 0
2、if self.active = true
3、if self.active = false
想请教三者的区别 刚才试了一下 应该是有区别的
[LINE]1,#dddddd[/LINE]
多谢tommay提醒 修正别字= =|
[LINE]1,#dddddd[/LINE]
本贴由论坛斑竹redant结贴,如楼主认为问题未解决,请重新将此贴编辑为“有事请教”,并回帖叙述疑点即可~ ^-^
作者:
hitlerson
时间:
2009-3-19 18:59
if self.active 判断 self.active 的真伪值
if self.active = true 赋予 self.active 的值为 true 再判断赋值语句的真伪,赋值语句恒等于真值
if self.active = false 同上 [LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
tommay
时间:
2009-3-19 19:01
1、按F1搜active可以知道active为Window的属性
active
光标的闪烁状态。真为闪烁。
2、if self.active 等价于 if self.active == true
3、"=" 是赋值 "=="是等于
4、是false 不是flase [LINE]1,#dddddd[/LINE]
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者:
蜂蜜蚂蚁
时间:
2009-3-19 19:03
if self.active = true 不是判断当true的情况 再进行下面的吗?
别的if 好像是这样的
多谢
作者:
tommay
时间:
2009-3-19 19:04
以下引用
蜂蜜蚂蚁于2009-3-19 11:03:06
的发言:
if self.active = true 不是判断当true的情况 再进行下面的吗?
别的if 好像是这样的
多谢
同上
判断当true的情况 if self.active == true 其实 if self.active就行了
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1