void Start() { _interact = GetComponent <InteractWithObject>(); _inventory = Systems.Inventory; Shovel = Resources.Load <Item>("Items/Shovel"); Rope = Resources.Load <Item>("Items/Rope"); }
public void Interaction() { Systems.Status.AffectWarmth(50); _firstInteraction = false; _interact.SetInteractText("Press 'E' to Rest in Bed"); _interact.DeleteItems(); _interact = null; }
public void Interaction() { Systems.Status.AffectRelief(100); _firstInteraction = false; _interact.SetInteractText("Press 'E' to Use Toilet"); _interact.DeleteItems(); _interact = null; }
void Start() { logger = GameObject.Find("Logger").GetComponent <LogToServer>(); _interact = GetComponent <InteractWithObject>(); _inventory = Systems.Inventory; Wrench = Resources.Load <Item>("Items/Wrench"); _inventory.CheckOnAdd.AddListener(UpdateConditions); }
void Start() { _interact = GetComponent <InteractWithObject>(); _inventory = Systems.Inventory; Pot = Resources.Load <Item>("Items/Pot"); Wood = Resources.Load <Item>("Items/Wood"); }
void Start() { _interact = GetComponent <InteractWithObject>(); _inventory = Systems.Inventory; Heater.SetActive(false); MustardWater = Resources.Load <Item>("Items/Jug"); FilledWater = Resources.Load <Item>("Items/DirtyMustardWater"); }
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"); }
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); }
public void Interaction() { if (!_firstInteraction) { Systems.Status.AffectHydration(50); } else { _firstInteraction = false; _interact.SetInteractText("Press 'E' to Drink from Sink"); _interact.DeleteItems(); _interact = null; } }
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>(); }
// Start is called before the first frame update void Start() { script = BarrelWithWater.GetComponent <InteractWithObject>(); script1 = Controller.GetComponent <InteractWithObject>(); }
protected override void Awake() { base.Awake(); attackGameObject = GetComponent <AttackGameObject>(); interactWithObject = GetComponent <InteractWithObject>(); }
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; }
private void Start() { _interact = GetComponent <InteractWithObject>(); Systems.Objectives.Register(EventKey, () => _satisfied = true); }
void Start() { logger = GameObject.Find("Logger").GetComponent <LogToServer>(); _interact = GetComponent <InteractWithObject>(); _inventory = Systems.Inventory; }
//private GameObject levelAudio; void Start() { _interact = GetComponent <InteractWithObject>(); BewareTheStorm = "A storm is approaching. Go to the shelter."; }
// Start is called before the first frame update void Start() { master = GameObject.Find("CompostingMaster").GetComponent <CompostingMaster>(); _interact = GetComponent <InteractWithObject>(); }
void Start() { _interact = GetComponent <InteractWithObject>(); _inventory = Systems.Inventory; MustardWater = Resources.Load <Item>("Items/Jug"); }