Beispiel #1
0
 public void NextBehavior()
 {
     if (myTime < 135 && !(behavior == 1)) //BEHAVIOR 1
     {
         behavior = 1;
         bc.Display("tense debate about the police", col, 3f, friendclips[0], NextBehavior);
         annoy.value = .6f;
         return;
     }
     if (myTime < 180 && !(behavior == 2)) //BEHAVIOR 2
     {
         behavior = 2;
         pm.StartWalking(PathA, NextBehavior);
         annoy.value = 0f;
         return;
     }
     if (myTime < 285 && !(behavior == 3)) //BEHAVIOR 3
     {
         behavior = 3;
         bc.Display("cheerfull exchange about the cake", col, 3f, friendclips[1], NextBehavior);
         annoy.value = 0f;
         return;
     }
     if (myTime >= 285 && !(behavior == 4)) //BEHAVIOR 4
     {
         behavior = 4;
         pm.StartWalking(PathB, NextBehavior);
         annoy.value = 0f;
         return;
     }
 }
Beispiel #2
0
 public void NextBehavior()
 {
     if (behavior == 3)
     {
         return;
     }
     if (behavior == 0) //BEHAVIOR 1
     {
         behavior = 1;
         bc.Display("enthusiastic chat \nabout cake", col, 3f, friendclips[0], NextBehavior);
         annoy.value = 0f;
         return;
     }
     if (behavior == 1) //BEHAVIOR 2
     {
         behavior = 2;
         pm.StartWalking(PathA, NextBehavior);
         annoy.value = 0f;
         return;
     }
     if (behavior == 2) //BEHAVIOR 3
     {
         behavior = 3;
         bc.Display("debate about animal rights", col, 3f, friendclips[1], NextBehavior);
         annoy.value = 0f;
         return;
     }
 }
 public void NextBehavior()
 {
     i++;
     if (i >= PATHS.Count)
     {
         i = 0;
     }
     pm.StartWalking(PATHS[i], NextBehavior);
 }
 private new void FixedUpdate()
 {
     base.FixedUpdate();
     if (!started && myTime > Startwalkingafter)
     {
         pm.StartWalking(PathA);
         started = true;
     }
 }
 new void Start()
 {
     base.Start();
     //BC
     bc = GetComponent <BackgroundChatter>();
     //DIALOG
     Dialog = Dialogbox.Dialogsystem.gameObject;
     Dialogbox.Dialogstate Dend = new Dialogbox.Dialogstate {
         end = true
     };
     Dialogbox.Dialogstate ds0 = new Dialogbox.Dialogstate {
         Avatar = Portrait, Title = "Art Dealer", Message = "Do you want to buy that picture?", optionA = "How much is it?", optionB = "what..no!", oA_changeval = 0f, oB_changeval = 0f, end = false
     };
     Dialogbox.Dialogstate ds1 = new Dialogbox.Dialogstate {
         Avatar = Portrait, Title = "Art Dealer", Message = "500.000€", optionA = "Can we talk about sth else", optionB = "no bye,", oA_changeval = 0f, oB_changeval = 0f, end = false
     };
     Dialogbox.Dialogtransition dt0 = new Dialogbox.Dialogtransition {
         origial = ds0, oA_followup = ds1, oB_followup = Dend
     };
     Dialogbox.Dialogtransition dt1 = new Dialogbox.Dialogtransition {
         origial = ds1, oA_followup = ds0, oB_followup = Dend
     };
     ds    = new Dialogbox.Dialogstate[3];
     ds[0] = ds0;
     ds[1] = ds1;
     ds[2] = Dend;
     dt    = new Dialogbox.Dialogtransition[2];
     dt[0] = dt0;
     dt[1] = dt1;
     //PATHFINDING
     pm = GetComponent <PersonMotor>();
     PATHS.Add(PathA);
     PATHS.Add(PathB);
     PATHS.Add(PathC);
     PATHS.Add(PathD);
     PATHS.Add(PathE);
     pm.StartWalking(PATHS[0], NextBehavior);
 }