Ejemplo n.º 1
0
 // set the targetPos so that the man will be moving towards it
 // mainly invoked by PathFinder
 public void MoveTo(Vector3 pos, float tol, CrowdState s)
 {
     isMoving     = true;
     targetPos    = pos;
     targetPosTol = tol;
     SwitchState(s);
 }
Ejemplo n.º 2
0
    void Start()
    {
        head     = transform.Find("Head");
        body     = transform.Find("Body");
        armLeft  = transform.Find("ArmLeft");
        hand     = armLeft.Find("Hand");
        armRight = transform.Find("ArmRight");
        mood     = transform.Find("ThoughtBubble").Find("MoodIndicator");

        headSprites       = Resources.LoadAll <Sprite>(headFile);
        bodySprites       = Resources.LoadAll <Sprite>(bodyFile);
        moodSprites       = Resources.LoadAll <Sprite>(moodFile);
        handObjectSprites = Resources.LoadAll <Sprite>("Crowd objects");

        head.GetComponent <SpriteRenderer>().sprite = headSprites[0];
        body.GetComponent <SpriteRenderer>().sprite = bodySprites[1];
        mood.GetComponent <SpriteRenderer>().sprite = moodSprites[(int)currentMood + 1];
        int randObj = UnityEngine.Random.Range(0, handObjectSprites.Length /* * 2*/);

        if (randObj < handObjectSprites.Length)
        {
            hand.GetComponent <SpriteRenderer>().sprite = handObjectSprites[randObj];
        }
        orgHandPos  = hand.position;
        orgRotation = hand.rotation.z;

        crowdState = CrowdState.WAITING;
    }
Ejemplo n.º 3
0
 internal void startAction()
 {
     crowdState = CrowdStateMachine.CrowdState.ACTION;
     if (target == null)
     {
         target = BattleController.idols[UnityEngine.Random.Range(0, BattleController.idols.Count - 1)];
     }
 }
Ejemplo n.º 4
0
        public List <CrowdFunDingInfo> List(int Page, int Limit, CrowdState Type)
        {
            var data = ct.Set <CrowdFunDingInfo>()
                       .Include("MerchantBasicInfo.IndustryInfo")
                       .Where(x => x.CrowdState == Type)
                       .OrderBy(x => x.CreateDate);

            this.TotalCount = data.Count();
            return(data.Skip((Page - 1) * Limit).Take(Limit).ToList());
        }
        public ActionResult List(int Page = 1, int Limit = 6, CrowdState Type = CrowdState.Crowding)
        {
            dal.IsOrderDesc = true;
            dal.IsThenDesc  = true;
            var data = dal.List(Page, Limit, Type);

            ViewBag.CrowdState = Type;
            ViewBag.Page       = Page;
            ViewBag.Count      = dal.TotalCount;
            return(View(data));
        }
Ejemplo n.º 6
0
 public void SwitchState(CrowdState s)
 {
     if (state != s)
     {
         if (state != CrowdState.CONFUSED)
         {
             lastState = state;
         }
         state            = s;
         stateCoolingDown = DataSet.magicNumber;
     }
 }