예제 #1
0
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (MouseRaycastOnButton())
         {
             _lightOn = !_lightOn;
             _changer.changeObject(new ConcreteObjectChanger(s => s.changeLiteralObject(_lightOn)));
         }
     }
 }
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (MouseRaycastOnButton())
         {
             _changer.changeObject(new ConcreteObjectChanger(s =>
             {
                 s.changeLiteralObject(5);
             }));
         }
     }
 }
예제 #3
0
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (MouseRaycastOnFridge())
         {
             _changer.changeObject(new ConcreteObjectChanger(s =>
             {
                 s.changeLiteralObject(s.getInt() - 1);
             }));
         }
     }
 }
예제 #4
0
 void Update()
 {
     if (interval <= 0)
     {
         if (intensity <= 0)
         {
             sign = 1;
         }
         else if (intensity >= 100)
         {
             sign = -1;
         }
         intensity         += sign;
         sunlight.intensity = intensity / 100.0f;
         changer.changeObject(new ConcreteObjectChanger(s => s.changeLiteralObject(intensity)));
         interval = 50;
     }
     interval--;
 }
 private void OnTriggerEnter(Collider other)
 {
     _changer.changeObject(new ConcreteObjectChanger(s => s.changeLiteralObject(true)));
 }
예제 #6
0
        void Start()
        {
            StatementChanger _changer = LCSEndpoint.lcs.makeStatementChanger(LCSEndpoint.PREFIX + "person", LCSEndpoint.PREFIX + "hasAccessCard");

            _changer.changeObject(new ConcreteObjectChanger(s => s.changeObject(s.getModel().getResource(LCSEndpoint.PREFIX + "accessCard").asResource())));
        }
예제 #7
0
        void Start()
        {
            StatementChanger _changer = LCSEndpoint.lcs.makeStatementChanger(LCSEndpoint.PREFIX + "person", LCSEndpoint.PREFIX + "hasName");

            _changer.changeObject(new ConcreteObjectChanger(s => s.changeObject(_playerName)));
        }