Exemple #1
0
 public bsVali()
 {
     var builder = new ConfigurationBuilder()
                   .SetBasePath(Directory.GetCurrentDirectory())
                   .AddJsonFile("C:\\Users\\user\\documents\\visual studio 2017\\Projects\\WebApplication2\\WebApplication2\\appsettings.json", optional: false, reloadOnChange: true)
                   .AddEnvironmentVariables();
     var bs = new bs(builder.Build(), null);
 }
Exemple #2
0
        public ContentsController(bs b)
        {
            bs = b;
            //문서 파일
            string con10CheckKey = "ContentsController/upfileFilter/con10Check";

            if (bs.S(con10CheckKey) == null)
            {
                bs.S(con10CheckKey, true);
                bs.upfileFilterAdd("con10Check", (Stream data, string ext) => {
                    return(data);
                });
            }

            //동영상 파일
        }
Exemple #3
0
    private void UpdateCursor()
    {
        Ray        r = Camera.main.ScreenPointToRay(Input.mousePosition);
        RaycastHit h;
        var        rbtn = Input.GetMouseButton(1);

        if (Physics.Raycast(r, out h, float.MaxValue))
        {
            Tool t = h.transform.GetComponentInParrent <Tool>();
            if (t != null && t.transform.parent == level)
            {
                if (rbtn)
                {
                    Destroy(t.gameObject);
                }
                if (click)
                {
                    MouseOverPrefab          = new GameObject("MouseOverPrefab").AddComponent <bs>();
                    MouseOverPrefab.position = cursorPos;
                    MouseOverPrefab.parent   = t.transform.parent;
                    t.transform.parent       = MouseOverPrefab.transform;
                }
            }
        }
        if (up)
        {
            if (MouseOverPrefab != null)
            {
                MouseOverPrefab.transform.GetChild(0).parent = MouseOverPrefab.parent;
                Destroy(MouseOverPrefab.gameObject);
                MouseOverPrefab = null;
            }
        }

        if (plane.collider.Raycast(r, out h, float.MaxValue))
        {
            cursorPos = h.point;
        }
        if (click)
        {
            lastpos = cursorPos;
        }
        if (Input.GetMouseButtonUp(0))
        {
            lastpos = null;
        }
    }
Exemple #4
0
    private void UpdateDrawTrail()
    {
        if (down && Holder == null)
        {
            if (lastpos == null)
            {
                lastpos = cursorPos;
            }

            Holder           = new GameObject("Holder").AddComponent <bs>();
            Holder.position  = lastpos.Value;
            LastPrefab       = (Tool)Instantiate(SelectedPrefab);
            LastPrefab.scale = Vector3.one * _EGameGUI.scale;
            boundsSizeX      = LastPrefab.collider.bounds.size.x;
            LastPrefab.transform.position = Holder.pos + new Vector3(-boundsSizeX / 2, 0, 0);
            //LastPrefab.transform.rotation = Quaternion.Euler(0, 270, 0);
            LastPrefab.transform.parent = Holder.transform;
        }
        if (lastpos != null && Holder != null)
        {
            var v    = lastpos.Value - cursorPos;
            var angl = Mathf.Atan2(v.y, v.x) * Mathf.Rad2Deg;
            var rot  = Holder.transform.rotation.eulerAngles;
            rot.z = angl;
            Holder.transform.rotation = Quaternion.Euler(rot);
            if (v.magnitude > boundsSizeX)
            {
                lastpos = lastpos.Value + Holder.transform.rotation * Vector3.left * boundsSizeX;
                LineUp();
            }
        }
        if (up)
        {
            LineUp();
        }
    }
Exemple #5
0
 void Start()
 {
     bsScript = obj11.GetComponent <bs>();
 }
Exemple #6
0
    private void UpdateCursor()
    {
        Ray r = Camera.main.ScreenPointToRay(Input.mousePosition);
        RaycastHit h;
        var rbtn = Input.GetMouseButton(1);        
        if (Physics.Raycast(r, out h, float.MaxValue))
        {
            Tool t = h.transform.GetComponentInParrent<Tool>();
            if (t != null && t.transform.parent == level)
            {
                
                if (rbtn)
                    Destroy(t.gameObject);
                if (click)
                {
                    MouseOverPrefab = new GameObject("MouseOverPrefab").AddComponent<bs>();
                    MouseOverPrefab.position = cursorPos;
                    MouseOverPrefab.parent = t.transform.parent;
                    t.transform.parent = MouseOverPrefab.transform;
                }                
            }            
        }
        if (up)
        {
            if (MouseOverPrefab != null)
            {

                MouseOverPrefab.transform.GetChild(0).parent = MouseOverPrefab.parent;
                Destroy(MouseOverPrefab.gameObject);
                MouseOverPrefab = null;
                
            }
            
        }

        if (plane.collider.Raycast(r, out h, float.MaxValue))
            cursorPos = h.point;
        if (click)
            lastpos = cursorPos;
        if (Input.GetMouseButtonUp(0))
            lastpos = null;
    }
Exemple #7
0
    private void UpdateDrawTrail()
    {
        if (down && Holder == null)
        {
            if (lastpos == null)
                lastpos = cursorPos;

            Holder = new GameObject("Holder").AddComponent<bs>();
            Holder.position = lastpos.Value;
            LastPrefab = (Tool)Instantiate(SelectedPrefab);
            LastPrefab.scale = Vector3.one * _EGameGUI.scale;
            boundsSizeX = LastPrefab.collider.bounds.size.x;
            LastPrefab.transform.position = Holder.pos + new Vector3(-boundsSizeX / 2, 0, 0);
            //LastPrefab.transform.rotation = Quaternion.Euler(0, 270, 0);
            LastPrefab.transform.parent = Holder.transform;
            
        }
        if (lastpos != null && Holder!=null)
        {
            var v = lastpos.Value - cursorPos;
            var angl = Mathf.Atan2(v.y, v.x) * Mathf.Rad2Deg;
            var rot = Holder.transform.rotation.eulerAngles;
            rot.z = angl;
            Holder.transform.rotation = Quaternion.Euler(rot);
            if (v.magnitude > boundsSizeX)
            {
                lastpos = lastpos.Value + Holder.transform.rotation * Vector3.left * boundsSizeX;
                LineUp();
            }            
        }
        if (up)
        {
            LineUp();
        }
    }
Exemple #8
0
 public RsaController(bs b)
 {
     bs = b;
 }
Exemple #9
0
 public HomeController(bs b)
 {
     bs = b;
 }
Exemple #10
0
 public StudentController(bs b)
 {
     bs = b;
 }
Exemple #11
0
 public TreeController(bs b)
 {
     bs = b;
 }
Exemple #12
0
 public SimpleItemDescriptor(bs instance)
 {
     _internal = instance;
 }
Exemple #13
0
 public ProfessorController(bs b)
 {
     bs = b;
 }