// void Awake() { instance = this; phases = new List <GameObject>(); // StartCoroutine(Test()); }
// Use this for initialization void Awake() { if(Instance != null) { Destroy(this.gameObject); return; } Instance = this; AirConsole.instance.onConnect += AirConsole_instance_onConnect; }
// Use this for initialization void Awake() { if (Instance != null) { Destroy(this.gameObject); return; } Instance = this; AirConsole.instance.onConnect += AirConsole_instance_onConnect; }
public void changeVolume(float volume) { StoryTeller storyteller = GameObject.FindObjectOfType <StoryTeller> (); Menu menu = GameObject.FindObjectOfType <Menu> (); if (storyteller != null || menu != null) { volume = 0; } for (int i = 0; i < audioSources.GetLength(0); i++) { audioSources [i].volume = volume * volumeModifier; } }
private void Start() { sT = GameObject.Find("Scripts").GetComponent <StoryTeller>(); dT = GameObject.Find("Scripts").GetComponent <Data>(); if (dT == null) { Debug.LogError("Data script not found"); ExitGame.ExitStatic(); } enemies = GameObject.FindGameObjectsWithTag("Enemy"); positions = new Vector3[enemies.Length]; for (int i = 0; i < enemies.Length; i++) { positions[i] = enemies[i].gameObject.transform.position; } }
static void Main(string[] args) { Parent man = new Parent("Мужик", "Мужской", 52); Parent woman = new Parent("Баба", "Женский", 44); Child daughter = new Child("Доченька", "Женский", 12, 4); Child son = new Child("Сынок", "Мужской", 8, 1); Goose goose = new Goose("Гуси-лебеди", "Птица", "Коричневые", 1, 1, 2); Oven oven = new Oven("Печка", "Еда"); AppleTree apple_tree = new AppleTree("Яблоня", "Фрукты", 21); MilkRiver milk_river = new MilkRiver("Молочная река", 100, 21); GrandParent <Human> granny_yaga = new GrandParent <Human>("Баба-Яга", "Женский", 119); Mouse mouse = new Mouse("Мышка", "Грызун", "Серый", 1, 1, 4); //правильная концвока при 2, 2, 2, 2, 1, 1, 1, 1 включая рандомы //Класс Zmey(в нем находится так же dictionary) и GrandParent обобщенные StoryTeller storyTeller = new StoryTeller(); storyTeller.TellStrory(man, woman, daughter, son, goose, oven, apple_tree, milk_river, granny_yaga, mouse); Console.ReadKey(); }
public string Serialize() { return(StoryTeller.Serialize(typeof(StoryPrompt), this)); }
public ChooseHappyStoryCommand(StoryTeller reciver) : base(reciver) { }
public BeginTheStoryCommand(StoryTeller reciver) : base(reciver) { }
//Identify the receiver public StoryTellerCommand(StoryTeller reciver) { this.reciver = reciver; }
public ChooseSadStoryCommand(StoryTeller reciver) : base(reciver) { }