Example #1
0
 public static void Update(this OperaComponent self)
 {
     if (Input.GetMouseButtonDown(1))
     {
         Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
         RaycastHit hit;
         if (Physics.Raycast(ray, out hit, 1000, self.mapMask))
         {
             self.ClickPoint      = hit.point;
             self.frameClickMap.X = self.ClickPoint.x;
             self.frameClickMap.Y = self.ClickPoint.y;
             self.frameClickMap.Z = self.ClickPoint.z;
             self.DomainScene().GetComponent <SessionComponent>().Session.Send(self.frameClickMap);
         }
     }
 }
Example #2
0
        public static void Update(this OperaComponent self)
        {
            if (Input.GetMouseButtonDown(1))
            {
                Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
                RaycastHit hit;
                if (Physics.Raycast(ray, out hit, 1000, self.mapMask))
                {
                    self.ClickPoint      = hit.point;
                    self.frameClickMap.X = self.ClickPoint.x;
                    self.frameClickMap.Y = self.ClickPoint.y;
                    self.frameClickMap.Z = self.ClickPoint.z;
                    self.DomainScene().GetComponent <SessionComponent>().Session.Send(self.frameClickMap);
                }
            }

            if (Input.GetKeyDown(KeyCode.R))
            {
                CodeLoader.Instance.LoadLogic();
                Game.EventSystem.Add(CodeLoader.Instance.GetTypes());
                Game.EventSystem.Load();
                Log.Debug("hot reload success!");
            }
        }