Example #1
0
    private void Awake()
    {
        level = 0;

        gridContent = GameObject.FindWithTag("Grid").GetComponent <GridContent>();
        if (gameObject.tag == "Probe")
        {
            panel.SetActive(false);
        }

        player    = GameObject.FindWithTag("Player").GetComponent <SolveInput>();
        text      = gameObject.GetComponentInChildren <Text>();
        text.text = "";
        myImage   = gameObject.GetComponent <Image>();
        Button btn = this.GetComponent <Button>();

        btn.onClick.AddListener(OnClick);
        if (gameObject.tag == "Probe")
        {
            countDown = probeCoolingCount;
        }
        if (gameObject.tag == "Clone")
        {
            countDown = cloneCoolingCount;
        }
        if (gameObject.tag == "Interference")
        {
            countDown = ITFCoolingCount;
        }
        Unlock    = true;
        inCooling = false;
        timer     = 0f;
    }
Example #2
0
 public void BuildContent(int num)//初始化,在Grid创建中调用
 {
     specialitem1 = specialitem2 = 1;
     contents     = new content[num];
     TotalNum     = num;
     Total        = num;
     Nothing      = Total - ResourceNum - ElectricNum - FirstAidNum - MResourceNum - MElectricNum - MFirstAidNum - ChipNum - IncidentNum - 2 - 2;//2为起点加终点+2个specialitem
     Resource     = ResourceNum;
     Electric     = ElectricNum;
     FirstAid     = FirstAidNum;
     MResource    = MResourceNum;
     MElectric    = MElectricNum;
     MFirstAid    = MFirstAidNum;
     Incident     = IncidentNum;
     Chip         = ChipNum;
     grid         = GameObject.FindWithTag("Grid").GetComponent <HexGrid>();
     asset        = GameObject.FindWithTag("Player").GetComponent <PlayerAsset>();
     solve        = GameObject.FindWithTag("Player").GetComponent <SolveInput>();
     Portal       = 9 * 20 + 8;
     si1image     = 16 * 20 + 12;
     si2image     = 6 * 20 + 17;
     printlist    = new int[num];
     MonsterNum   = new int[num];
     for (int i = 0; i < MonsterNum.Length; i++)
     {
         MonsterNum[i] = 1;
     }
     portalsee = sisee = false;
 }
Example #3
0
 private void Start()
 {
     camera        = Camera.main;
     camera.aspect = 1.78f;
     targetPos     = transform.position;
     input         = GetComponentInChildren <SolveInput>();
     //方政言偷偷加一句
     op.SetActive(true);
 }
Example #4
0
        private void button3_Click(object sender, EventArgs e)
        {
            //MessageBox.Show(MyConnect.getString("select Quantity from Products where ID_Product='P0000000001'"));
            //DateTime d = DateTime.Parse("2/1/2017");
            //MessageBox.Show(d.AddDays(-10).ToString());
            string temp = SolveInput.StandardizedString("TrầN đỨc     cừ");

            MessageBox.Show(temp);
        }
Example #5
0
 public bool UpdateObject(Customer c)
 {
     return(MyConnect.MyExecuteQuery("update Customers set Name_Customer=N'" + SolveInput.StandardizedString(c.Name) + "',Phone='" + c.phoneNumber.ToString() + "',Address=N'" + c.Address + "',Email='" + c.email + "' where ID_Customer='" + c.ID + "'"));
 }
Example #6
0
 public bool AddObject(Customer o)
 {
     return(MyConnect.MyExecuteQuery("insert into Customers values ('" + o.ID + "',N'" + SolveInput.StandardizedString(o.Name) + "','" + o.phoneNumber + "','" + o.Address + "','" + o.email + "',0)"));
 }
Example #7
0
 public bool UpdateObject(Employee o)
 {
     byte[] image = o.EmpImage == null ? null : ImageSQL.ImageToByteArray(o.EmpImage);
     return(MyConnect.MyExecuteQuery("update Employee set Name_Emp=N'" + SolveInput.StandardizedString(o.Name) + "',BirthDate='" + o.BirthDate.ToString("yyyy-MM-dd") + "',Sex=" + (o.Sex ? 1 : 0) + ",Address=N'" + o.Address + "',PhoneNumber=" + o.PhoneNumber + ",EmpImage=@image where ID_Emp=N'" + o.Id + "'", image));
 }
Example #8
0
 public bool AddObject(Employee o)
 {
     byte[] image = o.EmpImage == null?null: ImageSQL.ImageToByteArray(o.EmpImage);
     return(MyConnect.MyExecuteQuery("insert into Employee values(N'" + o.Id + "',N'" + SolveInput.StandardizedString(o.Name) + "','" + o.BirthDate.ToString("yyyy-MM-dd") + "'," + (o.Sex ? 1 : 0) + ",N'" + o.Address + "'," + o.PhoneNumber + ",@image)", image));
 }