예제 #1
0
    public void Initbase()
    {
        rect = GetComponent <RectTransform>();

        change = Camera.main.GetComponent <CursorChange>();
        myvec  = rect.localPosition;
    }
예제 #2
0
 void Start()
 {
     mouseOver    = false;
     obs          = GameObject.Find("Main Camera").GetComponent <Observer>();
     highlight    = transform.GetChild(0).gameObject;
     cc           = GetComponent <CursorChange>();
     resumeZoomTF = resumeZoomVP.transform.GetChild(0);
 }
예제 #3
0
 private void Start()
 {
     abilityHandler            = Player.GetComponentInChildren <AbilityHandler>();
     cursorChange              = MainCamera.GetComponent <CursorChange>();
     HbIndicator.Total         = healthObj.MaxHealth;
     HbIndicator.CurrentHealth = healthObj.Health;
     anim.SetBool("full", FullyHealed);
 }
예제 #4
0
        private void MoveCursor(Point p)
        {
            if (p.X > Width - 1)
            {
                p.X = Width - 1;
            }
            if (p.X < 0)
            {
                p.X = 0;
            }
            if (p.Y > Height - 1)
            {
                p.Y = Height - 1;
            }
            if (p.Y < 0)
            {
                p.Y = 0;
            }

            if (ReferenceC.SelectedX)
            {
                ReferenceC.XPixel = p.X;
            }
            if (ReferenceC.SelectedY)
            {
                ReferenceC.YPixel = p.Y;
            }

            if (MeasureC.SelectedX)
            {
                MeasureC.XPixel = p.X;
            }
            if (MeasureC.SelectedY)
            {
                MeasureC.YPixel = p.Y;
            }

            if (ReferenceC.Selected)
            {
                CursorChange?.Invoke(new float[]
                {
                    0, ReferenceC.X, ReferenceC.Y
                });
            }
            else
            {
                CursorChange?.Invoke(new float[]
                {
                    1, MeasureC.X, MeasureC.Y
                });
            }

            Invalidate();
        }
예제 #5
0
 // Start is called before the first frame update
 void Start()
 {
     dragging = false;
     prevPos  = Input.mousePosition;
     pos      = Input.mousePosition;
     isMoving = false;
     manual   = false;
     promptUp = false;
     gpc      = GetComponent <GridPlayerControl>();
     cc       = GetComponent <CursorChange>();
     gsArr    = new GridSpace[map.transform.childCount];
     for (int i = 0; i < map.transform.childCount; i++)
     {
         gsArr[i] = map.transform.GetChild(i).gameObject.GetComponent <GridSpace>();
     }
 }
예제 #6
0
    // Use this for initialization
    void Start()
    {
        change      = Camera.main.GetComponent <CursorChange>();
        parent      = transform.parent.GetComponent <RectTransform>();
        parentLight = parent.GetComponent <LightItem>();
        parentLight.points.Add(GetComponent <PointItem>());
        button = GetComponent <Button>();
        button.onClick.AddListener(ShowConfig);
        ChangeIndex();

        if (isStart)
        {
            data.currentTime = parentLight.mydata.start;
        }
        else
        {
            data.currentTime = parentLight.mydata.start + transform.position.x - (parent.position.x - parent.sizeDelta.x / 2);
        }



        if (isStart || isEnd)
        {
            if (!parentLight.iscopy)
            {
                transform.position = new Vector3(GetComponent <PointItem>().transform.position.x, GetComponent <PointItem>().transform.position.y - 50);
            }
            else
            {
                transform.position = new Vector3(GetComponent <PointItem>().transform.position.x, GetComponent <PointItem>().transform.position.y);
            }
        }

        data.num = (transform.localPosition.y + 50) / 100 * Globaldata.LIGHT;
        if (data.num <= 0)
        {
            data.num = 0;
        }
        Globaldata.Global.DrawLine(parentLight.posTran);
        Globaldata.Global.SortePoint(parentLight.points);

        if (!isStart && !isEnd)
        {
            ShowConfig();
        }
    }
예제 #7
0
    // Use this for initialization
    void Start()
    {
        parent = transform.parent.GetComponent <SingleScaleplate>();
        if (isInit)
        {
            ChangeMyself(time);
            isInit = false;
        }
        else
        {
            time = parent.index * 10 + ((transform.localPosition.x + 500) / 100);
        }

        change = Camera.main.GetComponent <CursorChange>();

        _button = GetComponent <Button>();
        _button.onClick.AddListener(ShowMyconfing);


        ShowMyconfing();

        // Globaldata.Global .showItemManger.
    }
예제 #8
0
 private void Start()
 {
     cc  = GetComponent <CursorChange>();
     obs = GameObject.Find("Player").GetComponent <GridObserver>();
     btn = GetComponent <Button>();
 }
예제 #9
0
 public void OnCursorChange(IntPtr cursor, CursorType type, CursorInfo customCursorInfo)
 {
     CursorChange?.Invoke(this, new CursorChangeEventArgs(cursor, type, customCursorInfo));
 }