private void OnValidate() { aura.color = noduleColour; _child = GetComponentInChildren <LevelInteraction>(); //target = FindObjectOfType<CinemachineTargetGroup>(); //_targetGroupController = target.GetComponent<TargetGroupController>(); }
// Use this for initialization void Start() { placedAnim = PlacedObjectInteractionMenu.GetComponent <Animator>(); placingAnim = PlacingObjectInteractionMenu.GetComponent <Animator>(); _tileInteractionLink = GameManager.Instance.SceneManagerLink.GetComponent <LevelInteraction>(); }
void Start() { gameTime = GameManager.Instance.ScriptHolderLink.GetComponent <TimeAndCalendar>(); _tileInteractionLink = GameManager.Instance.SceneManagerLink.GetComponent <LevelInteraction>(); }
public void DoInteraction(LevelInteraction interaction) { // Grandpa Interactions if(interaction.InteractionName.Equals("Football")) { SetFlag("FOOTBALL_TELEPORT", true); SetCurrentGrandpaState("GlowingHeirloom"); Grandpa.GetComponent<Player>().EnableGate("right"); } else if(interaction.InteractionName.Equals("HeirloomGrandpa")) { SetFlag("GRANDPA_HEIRLOOM", true); Grandpa.GetComponent<Player>().EnableHeirloom(true); SetCurrentGrandpaState("No hints"); } else if(interaction.InteractionName.Equals("Diary")) { SetFlag("DIARY_TELEPORT", true); SetCurrentGrandpaState("No hints"); Grandpa.GetComponent<Player>().EnableGate("down"); } else if(interaction.InteractionName.Equals("CribBox")) { SetFlag("BABY_TELEPORT", true); SetCurrentGrandpaState("No hints"); Grandpa.GetComponent<Player>().EnableGate("left"); } else if(interaction.InteractionName.Equals("BackyardFootball")) { // @TODO : play animation SetFlag("CAN_TACKLE", true); SetCurrentGrandpaState("No hints"); } else if(interaction.InteractionName.Equals("SexyTimeCloset")) { SetFlag("BABY_CHANGE", true); //Change their hair Child.GetComponent<PlayerCustomizations>().RandomizeHair(); Child.GetComponent<PlayerCustomizations>().RandomizeEyes(); if(Random.value > 0.5f) { Child.GetComponent<PlayerCustomizations>().RandomizeTattoo(); } SexyTimeDarkness.SetActive(false); Grandpa_SexyTime.GetComponent<ChatBubbleController>().Trigger(); } else if(interaction.InteractionName.Equals("BabyMonitor")) { if(QueryFlag("HAS_HEARING")) { SetFlag("HEARD_FIGHTING", true); } else { SetFlag("HEARD_STATIC", true); } } else if(interaction.InteractionName.Equals("BabyMobile")) { // @TODO save colour on right of mobile and set wallpaper for child SetFlag("CHANGED_WALLPAPER", true); } else if(interaction.InteractionName.Equals("Infant")) { if(QueryFlag("NO_WALKER")) { SetFlag("IS_BRAVE", true); SetCurrentGrandpaState("No hints"); } } // Child's Interactions else if(interaction.InteractionName.Equals("HonorMedal")) { SetFlag("WW2_TELEPORT", true); SetCurrentChildState("TheBox"); Child.GetComponent<Player>().EnableGate("right"); } else if(interaction.InteractionName.Equals("HeirloomKid")) { SetFlag("CHILD_HEIRLOOM", true); SetCurrentChildState("No hints"); Child.GetComponent<Player>().EnableHeirloom(true); } else if(interaction.InteractionName.Equals("BottleCaps")) { SetFlag("BAR_TELEPORT", true); SetCurrentChildState("No hints"); Child.GetComponent<Player>().EnableGate("down"); } else if(interaction.InteractionName.Equals("MedicalBills")) { SetFlag("STREET_TELEPORT", true); SetCurrentGrandpaState("No hints"); Child.GetComponent<Player>().EnableGate("left"); } else if(interaction.InteractionName.Equals("Grenade")) { if(QueryFlag("IS_BRAVE") && QueryFlag("VOLUNTEERED")) { SetFlag("HAS_HEARING", true); SetCurrentGrandpaState("No hints"); } } else if(interaction.InteractionName.Equals("Volunteer")) { // Trigger grenade throw SetFlag("VOLUNTEERED", true); } else if(interaction.InteractionName.Equals("DrunkPa")) { // Tattoo change, fade to house after tattoo sounds Grandpa.GetComponent<PlayerCustomizations>().RandomizeTattoo(); SetFlag("WHISPERED", true); SetCurrentGrandpaState("No hints"); } else if(interaction.InteractionName.Equals("StreetPa")) { if(QueryFlag("CAN_TACKLE") && QueryFlag("STREET_TELEPORT")) { SetFlag("NO_WALKER", true); Car.RunHimDown = false; // Remove grandpa's walker } } }
void Start() { _tileInteractionLink = GameManager.Instance.SceneManagerLink.GetComponent <LevelInteraction>(); setupButtons(); }