Exemplo n.º 1
0
    void Start()
    {
        _interact  = GetComponent <InteractWithObject>();
        _inventory = Systems.Inventory;

        Shovel = Resources.Load <Item>("Items/Shovel");
        Rope   = Resources.Load <Item>("Items/Rope");
    }
Exemplo n.º 2
0
 public void Interaction()
 {
     Systems.Status.AffectWarmth(50);
     _firstInteraction = false;
     _interact.SetInteractText("Press 'E' to Rest in Bed");
     _interact.DeleteItems();
     _interact = null;
 }
Exemplo n.º 3
0
 public void Interaction()
 {
     Systems.Status.AffectRelief(100);
     _firstInteraction = false;
     _interact.SetInteractText("Press 'E' to Use Toilet");
     _interact.DeleteItems();
     _interact = null;
 }
Exemplo n.º 4
0
    void Start()
    {
        logger     = GameObject.Find("Logger").GetComponent <LogToServer>();
        _interact  = GetComponent <InteractWithObject>();
        _inventory = Systems.Inventory;

        Wrench = Resources.Load <Item>("Items/Wrench");
        _inventory.CheckOnAdd.AddListener(UpdateConditions);
    }
Exemplo n.º 5
0
    void Start()
    {
        _interact  = GetComponent <InteractWithObject>();
        _inventory = Systems.Inventory;


        Pot  = Resources.Load <Item>("Items/Pot");
        Wood = Resources.Load <Item>("Items/Wood");
    }
Exemplo n.º 6
0
    void Start()
    {
        _interact  = GetComponent <InteractWithObject>();
        _inventory = Systems.Inventory;

        Heater.SetActive(false);
        MustardWater = Resources.Load <Item>("Items/Jug");
        FilledWater  = Resources.Load <Item>("Items/DirtyMustardWater");
    }
Exemplo n.º 7
0
    void Start()
    {
        _interact  = GetComponent <InteractWithObject>();
        _inventory = GameObject.FindWithTag("MainInventory").GetComponent <MoreMountains.InventoryEngine.Inventory>();

        Bucket    = Resources.Load <BaseItem>("Items/Bucket");
        Bag       = Resources.Load <BaseItem>("Items/Bag");
        Sawdust   = Resources.Load <BaseItem>("Items/Sawdust");
        Sanitizer = Resources.Load <BaseItem>("Items/Sanitizer");
    }
Exemplo n.º 8
0
    void Start()
    {
        _interact  = GetComponent <InteractWithObject>();
        _inventory = Systems.Inventory;

        Bucket      = Resources.Load <Item>("Items/Bucket");
        Bag         = Resources.Load <Item>("Items/Bag");
        Sawdust     = Resources.Load <Item>("Items/Sawdust");
        Sanitizer   = Resources.Load <Item>("Items/Sanitizer");
        ToiletPaper = Resources.Load <Item>("Items/ToiletPaper");
        _inventory.CheckOnAdd.AddListener(UpdateConditions);

        Buckets.SetActive(false);
    }
Exemplo n.º 9
0
 public void Interaction()
 {
     if (!_firstInteraction)
     {
         Systems.Status.AffectHydration(50);
     }
     else
     {
         _firstInteraction = false;
         _interact.SetInteractText("Press 'E' to Drink from Sink");
         _interact.DeleteItems();
         _interact = null;
     }
 }
Exemplo n.º 10
0
    private void Start()
    {
        _interact  = GetComponent <InteractWithObject>();
        _inventory = Systems.Inventory;
        if (CheckItem == null)
        {
            Debug.LogError("No item to check has been specified");
        }
        rb = GetComponent <Rigidbody>();

        fallCollider = transform.Find("Fall Collider").GetComponent <BoxCollider>();
        fallCollider.gameObject.GetComponent <CollisionCallback>().AddCallback("Player", HitPlayer);
        fallCollider.enabled = false;

        //QuakeManager.Instance.OnQuake.AddListener(Fall);
    }
 private void Start()
 {
     _interact = GetComponent <InteractWithObject>();
 }
Exemplo n.º 12
0
 // Start is called before the first frame update
 void Start()
 {
     script  = BarrelWithWater.GetComponent <InteractWithObject>();
     script1 = Controller.GetComponent <InteractWithObject>();
 }
Exemplo n.º 13
0
 protected override void Awake()
 {
     base.Awake();
     attackGameObject   = GetComponent <AttackGameObject>();
     interactWithObject = GetComponent <InteractWithObject>();
 }
Exemplo n.º 14
0
    private IEnumerator StartCutScene()
    {
        //if the sanitation is built, wait for four seconds and trigger "In the meantime..." slide
        yield return(new WaitForSeconds(1.5f));

        MiniGameClose.SetActive(false);
        if (GameObject.Find("Music") != null)
        {
            GameObject.Find("Music").GetComponent <AudioSource>().Pause();
        }
        InTheMeantimeCanvas.SetActive(true);

        //then trigger the video
        yield return(new WaitForSeconds(3f));

        Systems.Status.Pause();
        VideoBackground.SetActive(true);
        VideoDisplayer.SetActive(true);
        Video.SetActive(true);
        Video.GetComponent <VideoPlayer>().Play();

        InTheMeantimeCanvas.SetActive(false);
        yield return(new WaitForSeconds(63f));

        //turn off the video
        Systems.Status.UnPause();
        VideoBackground.SetActive(false);
        VideoDisplayer.SetActive(false);
        Video.SetActive(false);
        if (GameObject.Find("Music") != null)
        {
            GameObject.Find("Music").GetComponent <AudioSource>().Play();
        }
        MiniGameClose.SetActive(true);

        //change banner to "Look for Tsu"
        _canvas.ChangeText("Look for Tsu");

        yield return(new WaitForSeconds(3f));

        //Tsu's dialogue appears
        script.Interact();
        bark.Play();

        //Tsu's dot appears
        if (GameObject.Find("TsuPointer") != null)
        {
            GameObject.Find("TsuPointer").GetComponent <FlatFollow>().appear();
        }

        GameObject.Find("TrePointer").GetComponent <FlatFollow>().appear();
        GameObject.Find("MoPointer").GetComponent <FlatFollow>().appear();

        //Ahmad starts walking to Tsu
        scriptAhmad.enabled = true;
        Ahmad.GetComponent <SphereCollider>().isTrigger = false;
        _interact = Ahmad.GetComponent <InteractWithObject>();
        Destroy(_interact);
        print("move the maira");

        ////Maria starts moving towards Tsu
        scriptMaria.enabled = true;
        if (GameObject.Find("MariaAlert").activeInHierarchy)
        {
            GameObject.Find("MariaAlert").SetActive(false);
        }
        Maria.GetComponent <SphereCollider>().enabled = false;
        ////Maria.GetComponent<InteractWithMaria>().Kill();
        Maria.GetComponent <InteractWithMaria>().enabled = false;

        ////Bruce starts walking to Tsu
        scriptBruce.enabled = true;
        BruceNav.enabled    = true;
        if (GameObject.Find("BruceAlert").activeInHierarchy)
        {
            GameObject.Find("BruceAlert").SetActive(false);
        }
        BruceCont.GetComponent <SphereCollider>().enabled     = false;
        BruceCont.GetComponent <InteractWithObject>().enabled = false;
    }
Exemplo n.º 15
0
 private void Start()
 {
     _interact = GetComponent <InteractWithObject>();
     Systems.Objectives.Register(EventKey, () => _satisfied = true);
 }
Exemplo n.º 16
0
 void Start()
 {
     logger     = GameObject.Find("Logger").GetComponent <LogToServer>();
     _interact  = GetComponent <InteractWithObject>();
     _inventory = Systems.Inventory;
 }
Exemplo n.º 17
0
    //private GameObject levelAudio;


    void Start()
    {
        _interact      = GetComponent <InteractWithObject>();
        BewareTheStorm = "A storm is approaching. Go to the shelter.";
    }
Exemplo n.º 18
0
 // Start is called before the first frame update
 void Start()
 {
     master    = GameObject.Find("CompostingMaster").GetComponent <CompostingMaster>();
     _interact = GetComponent <InteractWithObject>();
 }
Exemplo n.º 19
0
 void Start()
 {
     _interact    = GetComponent <InteractWithObject>();
     _inventory   = Systems.Inventory;
     MustardWater = Resources.Load <Item>("Items/Jug");
 }