private void Start() { if (instance == null) { instance = this; } }
public virtual void OnTriggerExit(Collider col) { if (col.gameObject.tag == "Player") { TextMaster.EndText(); Debug.Log($"{gameObject.name} <color=red>lost</color> player"); canUse = false; } }
public virtual void OnTriggerEnter(Collider col) { if (col.gameObject.tag == "Player") { TextMaster.IndicatorOn(gameObject.name); Debug.Log($"{gameObject.name} <color=green>found</color> player"); canUse = true; } }
void Awake() { _count = 0; _voteButton = GetComponent <VoteButton> (); _finger = GameObject.Find("Finger").GetComponent <FInger>(); _master = _instractor.GetComponent <TextMaster>(); _finger.InVisible(); _descriptionText = GameObject.Find("Canvas/Panel/Description").GetComponent <Text>(); }
public static void YouDidIt() { TextMaster.ShowText( new Message( false, "Well thank me you actually f*****g did it.", "Yahweh" )); }
public static void ScoldNoah(Animal fuckee, Animal f****r) { TextMaster.ShowText( new Message( false, Dictionaries.animalPairs[new Tuple <AnimalType, AnimalType>(f****r.animalType, fuckee.animalType)], "Yahweh" )); }
private void ClaimChild() { var gm = GameManager.instance; var player = gm.player; List <Animal> toBeKilled = new List <Animal>(); List <Animal> toFollow = new List <Animal>(); Debug.Log("looking for children"); for (var i = 0; i < player.followTrail.Count; i++) { var test = player.followTrail[i]; Debug.Log($"looking at {test.gameObject.name}"); if (test.animalType == AnimalType.CHILD) { Debug.Log("found child"); var wood = GameObject.Instantiate(Wood, transform.position, transform.rotation); childCount++; toBeKilled.Add(test); toFollow.Add(wood.GetComponent <Animal>()); } } foreach (var vermin in toBeKilled) { player.followTrail.Remove(vermin); player.MakeChain(); Destroy(vermin.gameObject); } if (toBeKilled.Count == 0 && childCount < 8) { TextMaster.ShowText(new Message(false, "Noah, what the F**K are you DOING. BRING ME THE YOUNG!!", "Yahweh")); } if (toBeKilled.Count == 0 && childCount == 8) { TextMaster.ShowText(new Message(false, "Don't just stand there looking stupid, bring the wood to the Ark and fix it.", "Yahweh")); } foreach (var wood in toFollow) { wood.GetCarried(); } }
private void DoIntro() { TextMaster.ShowText(introMessages[currentMessage]); currentMessage++; if (currentMessage == introMessages.Count) { introComplete = true; } else { canUse = true; } }
void calm() { if (Program.I().ocgcore.condition == Ocgcore.Condition.duel && Program.I().ocgcore.InAI == false && Program.I().room.mode != 2) { if (player == 0) { if (location == CardLocation.Deck) { if (Program.I().book.lab != null) { destroy(Program.I().book.lab.gameObject); Program.I().book.lab = null; } return; } } } if (player == 1) { if (location == CardLocation.Deck) { if (Program.I().book.labop != null) { destroy(Program.I().book.labop.gameObject); Program.I().book.labop = null; } return; } } for (int i = 0; i < Program.I().ocgcore.cards.Count; i++) { if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy) { if ((Program.I().ocgcore.cards[i].p.location & (UInt32)location) > 0) { if (Program.I().ocgcore.cards[i].p.controller == player && Program.I().ocgcore.cards[i].isShowed == false) { Program.I().ocgcore.cards[i].ES_safe_card_move_to_original_place(); } } } } if (hintText != null) { hintText.dispose(); hintText = null; } }
private void ClaimWood() { var gm = GameManager.instance; var player = gm.player; List <Animal> toBeKilled = new List <Animal>(); Debug.Log("looking for children"); for (var i = 0; i < player.followTrail.Count; i++) { var test = player.followTrail[i]; Debug.Log($"looking at {test.gameObject.name}"); if (test.animalType == AnimalType.WOOD) { Debug.Log("found child"); woodCount++; toBeKilled.Add(test); } } foreach (var vermin in toBeKilled) { player.followTrail.Remove(vermin); player.MakeChain(); Destroy(vermin.gameObject); } if (toBeKilled.Count == 0 && woodCount < 8) { TextMaster.ShowText(new Message(false, "You do not have enough wood to fix the Ark.", "")); } if (woodCount == 8) { YahwehController.YouDidIt(); } }
void excite() { excited = true; if (location == CardLocation.Grave && Program.I().ocgcore.cantCheckGrave) { return; } YGOSharp.Card data = null; string tailString = ""; uint con = 0; for (int i = 0; i < Program.I().ocgcore.cards.Count; i++) { if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy) { if ((Program.I().ocgcore.cards[i].p.location & (UInt32)location) > 0) { if (Program.I().ocgcore.cards[i].p.controller == player) { if (Program.I().ocgcore.cards[i].isShowed == false) { data = Program.I().ocgcore.cards[i].get_data(); tailString = Program.I().ocgcore.cards[i].tails.managedString; con = Program.I().ocgcore.cards[i].p.controller; } } } } } Program.I().cardDescription.setData(data, con == 0 ? GameTextureManager.myBack : GameTextureManager.opBack, tailString, data != null); if (Program.I().ocgcore.condition == Ocgcore.Condition.duel && Program.I().ocgcore.InAI == false && Program.I().room.mode != 2) { if (player == 0) { if (location == CardLocation.Deck) { if (Program.I().book.lab != null) { destroy(Program.I().book.lab.gameObject); Program.I().book.lab = null; } Program.I().book.lab = create(Program.I().New_decker, Vector3.zero, Vector3.zero, false, Program.ui_main_2d, true).GetComponent <UILabel>(); Program.I().book.realize(); Vector3 screenPosition = Input.mousePosition; screenPosition.x -= 90; screenPosition.y += Program.I().book.lab.height / 4; screenPosition.z = 0; Vector3 worldPositin = Program.camera_main_2d.ScreenToWorldPoint(screenPosition); Program.I().book.lab.transform.position = worldPositin; return; } } } if (player == 1) { if (location == CardLocation.Deck) { if (Program.I().book.labop != null) { destroy(Program.I().book.labop.gameObject); Program.I().book.labop = null; } Program.I().book.labop = create(Program.I().New_decker, Vector3.zero, Vector3.zero, false, Program.ui_main_2d, true).GetComponent <UILabel>(); Program.I().book.realize(); Vector3 screenPosition = Input.mousePosition; screenPosition.x -= 90; screenPosition.y -= Program.I().book.labop.height / 4; screenPosition.z = 0; Vector3 worldPositin = Program.camera_main_2d.ScreenToWorldPoint(screenPosition); Program.I().book.labop.transform.position = worldPositin; return; } } int count = 0; for (int i = 0; i < Program.I().ocgcore.cards.Count; i++) { if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy) { if ((Program.I().ocgcore.cards[i].p.location & (UInt32)location) > 0) { if (Program.I().ocgcore.cards[i].p.controller == player) { count++; } } } } int count_show = 0; for (int i = 0; i < Program.I().ocgcore.cards.Count; i++) { if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy) { if ((Program.I().ocgcore.cards[i].p.location & (UInt32)location) > 0) { if (Program.I().ocgcore.cards[i].p.controller == player && Program.I().ocgcore.cards[i].isShowed == false) { count_show++; } } } } if (hintText != null) { hintText.dispose(); hintText = null; } if (count > 0) { hintText = new TextMaster(count.ToString(), Input.mousePosition, false); } Vector3 qidian = new Vector3(Input.mousePosition.x, Input.mousePosition.y, 12f); Vector3 zhongdian = new Vector3(2f * Program.I().ocgcore.getScreenCenter() - Input.mousePosition.x, Input.mousePosition.y, 19f); int i_real = 0; for (int i = 0; i < Program.I().ocgcore.cards.Count; i++) { if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy) { if ((Program.I().ocgcore.cards[i].p.location & (UInt32)location) > 0) { if (Program.I().ocgcore.cards[i].p.controller == player) { if (Program.I().ocgcore.cards[i].isShowed == false) { Vector3 screen_vector_to_move = Vector3.zero; int gezi = 8; if (count_show > 8) { gezi = count_show; } int index = count_show - 1 - i_real; i_real++; screen_vector_to_move = (new Vector3(0, 50f * (float)Math.Sin(((float)index / (float)count) * 3.1415926f), 0)) + qidian + ((float)index / (float)(gezi - 1)) * (zhongdian - qidian); //iTween.MoveTo(Program.I().ocgcore.cards[i].gameObject, Camera.main.ScreenToWorldPoint(screen_vector_to_move), 0.5f); //iTween.RotateTo(Program.I().ocgcore.cards[i].gameObject, new Vector3(-30, 0, 0), 0.1f); Program.I().ocgcore.cards[i].TweenTo(Camera.main.ScreenToWorldPoint(screen_vector_to_move), new Vector3(-30, 0, 0), true); } } } } } if (count_show > 0) { Program.I().audio.clip = Program.I().zhankai; Program.I().audio.Play(); } }
public virtual void Interact() { canUse = false; TextMaster.EndText(); // Implement in child class }