示例#1
0
    public override void ObjTrigger(string eventName)
    {
        if (eventName == NormalTriggers.mouseClick)
        {
            tDeskLampState = GetDicStateValue();

            switch (tDeskLampState)
            {
            case DeskLampState.Off:

                if (DicDataReader.IsDicStateExist(DicDataReader.SceneObjDataDicName, "DeskPlug") &&
                    DicDataReader.GetDicStateValue <DeskPlugState>(DicDataReader.SceneObjDataDicName, "DeskPlug") == DeskPlugState.On)
                {
                    SetDicStateValue(DeskLampState.On);
                    SetSelfViewByState();
                }


                break;


            case DeskLampState.On:
                break;


            default:
                break;
            }
        }
    }
示例#2
0
 //从dic中获取状态变量
 protected T GetDicStateValue()
 {
     return(DicDataReader.GetDicStateValue <T>(DicDataReader.SceneObjDataDicName, objName));
 }