示例#1
0
    public void Spawn()
    {
        GameObject spawn = Instantiate(person, transform.position, Quaternion.identity, gameObject.transform);

        target = m_main.allHouses[Random.Range(0, m_main.allHouses.Count)].gameObject;
        carrier c_person = spawn.GetComponent <carrier> ();

        c_person.Setup(target.transform.position, gameObject.GetComponent <houses> (), m_main);
    }
示例#2
0
        public CarrierBO AddBroker(CarrierBO carrier)
        {
            carrier _carrier = new carrier();

            _carrier.carriername = carrier.CarrierName;
            if (carrier.Address != null)
            {
                _carrier.addrkey = carrier.Address.AddrKey;
            }
            _carrier.carrierid = carrier.CarrierId;
            var carrierguid = repo.Add(_carrier);

            carrier.CarrierKey = carrierguid;
            return(carrier);
        }
示例#3
0
        public Carrier create(Carrier c)
        {
            carrier entity = new carrier();
            bool    flag   = false;

            if (c.id > 0)
            {
                flag   = true;
                entity = this.db.carriers.Single <carrier>((Expression <Func <carrier, bool> >)(x => x.id == c.id));
            }
            entity.mms   = c.mms;
            entity.sms   = c.title;
            entity.title = c.title;
            if (!flag)
            {
                this.db.carriers.InsertOnSubmit(entity);
            }
            this.db.SubmitChanges();
            c.id = entity.id;
            return(c);
        }