Ejemplo n.º 1
0
 public override ItemTypes OnInteract()
 {
     if (!solarPanelSet)
     {
         solarPanelSet = true;
         alert.SetActive(false);
         toolStore.fill();
         Component[] panels = this.GetComponentsInChildren <MeshRenderer>();
         foreach (Component panel in panels)
         {
             ((MeshRenderer)panel).material.color = new Color(0.2683339f, 0.4018649f, 0.4245283f, 1.0f);
         }
     }
     else
     {
         //have tick appear for task completion
         this.gameObject.SetActive(false);
         this.truckSolarPanels[activePanels].SetActive(true);
         activePanels++;
         solarPanelSet = false;
         //complete solarPanel Tasks
         taskController.taskComplete(TaskTypes.Solar);
         scoreController.taskScored(CityScoreController.Tasks.SOLAR);
     }
     PlayInteractSound();
     return(ItemTypes.NONE);
 }
Ejemplo n.º 2
0
    public override ItemTypes OnInteract()
    {
        //Make sign they are holding visible
        this.gameObject.transform.Find("character").Find("Armature").Find("main").Find("chest").Find("shoulders").Find("armRight1").Find("armRight2").Find("handRight").Find("itemLeft").Find("ProtestSign").gameObject.SetActive(true);
        hasSign = true;
        cityCrowdNPC.animator.SetBool("holdingSign", true);
        PlayInteractSound();
        //complete sign task
        taskController.taskComplete(TaskTypes.Sign);
        scoreController.taskScored(CityScoreController.Tasks.SIGN);

        return(ItemTypes.NONE);
    }
Ejemplo n.º 3
0
    public override ItemTypes OnInteract()
    {
        //get NPC to change course and leave off screen
        //Complete Bike task
        npc = this.GetComponent <CityBikeNPC>();
        npc.GiveBike();
        CompleteTask();
        PlayInteractSound();

        //Decrease score & display popup
        scoring.taskScored(CityScoreController.Tasks.BIKE);

        return(ItemTypes.NONE);
    }