Inheritance: MonoBehaviour
Ejemplo n.º 1
0
 protected virtual void OnEnding(Hero hero)
 {
     Ending?.Invoke(this, new EndEventArgs()
     {
         Hero = hero
     });
 }
Ejemplo n.º 2
0
        Task LoadTask(Quest parent, XElement element)
        {
            Task task = CreateTask();

            task.ID              = element.Attribute("ID").Value;
            task.Title           = element.Attribute("Title").Value;
            task.Description     = element.Attribute("Description").Value;
            task.StartScript     = element.Attribute("StartScript").Value;
            task.IterationScript = element.Attribute("IterationScript").Value;

            task.Status = QuestStatus.Inactive;
            task.Owner  = parent;

            XElement e = element.Element("Endings");
            IEnumerable <XElement> endingElements =
                from e1 in e.Elements()
                select e1;

            foreach (XElement endingElement in endingElements)
            {
                Ending ending = LoadEnding(task, endingElement);
                task.Add(ending);
            }

            return(task);
        }
Ejemplo n.º 3
0
        private void ModifySelected(IEnumerable <object> selection)
        {
            Beginning.Raise(this, EventArgs.Empty);

            foreach (var obj in selection)
            {
                var data = obj.As <DataItem>();
                if (data == null)
                {
                    continue;
                }

                switch (data.Type)
                {
                case DataType.Integer:
                    data.Value = (int)data.Value + s_random.Next(2, 6);
                    break;

                case DataType.String:
                    data.Value = string.Format("{0}{1}", data.Value, Alphabet[s_random.Next(0, Alphabet.Length)]);
                    break;
                }

                ItemChanged.Raise(this, new ItemChangedEventArgs <object>(data));
            }

            Ending.Raise(this, EventArgs.Empty);
            Ended.Raise(this, EventArgs.Empty);
        }
Ejemplo n.º 4
0
// Update is called once per frame
    public void Run()
    {
        switch (GameState)
        {
        case "Starting":
            Starting.Invoke();
            break;

        case "Dying":
            Dying.Invoke();
            break;

        case "Playing":

            Playing.Invoke();
            break;

        case "Ending":
            Ending.Invoke();
            break;

        case "Winning":
            Winning.Invoke();
            break;
        }
    }
Ejemplo n.º 5
0
    // Update is called once per frame
    public void Run()
    {
        switch (GameState)
        {
        case GameStates.States.Starting:
            Starting.Invoke();
            break;

        case GameStates.States.Loading:
            Loading.Invoke();
            break;

        case GameStates.States.Playing:
            Playing.Invoke();
            break;

        case GameStates.States.Dying:
            Dying.Invoke();
            break;

        case GameStates.States.Ending:
            Ending.Invoke();
            break;
        }
    }
Ejemplo n.º 6
0
    private void ReadEndingsFromNode(XmlNode node)
    {
        if (node == null)
        {
            return;
        }
        foreach (XmlNode childNode in node.ChildNodes)
        {
            if (childNode.LocalName != "endings")
            {
                continue;
            }
            Ending newEnding = new Ending();
            newEnding.id = uint.Parse(childNode.Attributes[IDATTR_NAME].Value);

            ReadLangStringFromNode(childNode, new LangStringPair(newEnding.name, NAMENODE_NAME),
                                   new LangStringPair(newEnding.description, DESCNODE_NAME));

            foreach (XmlNode condChildNode in childNode.ChildNodes)
            {
                if (condChildNode.LocalName != "condition")
                {
                    continue;
                }
                EndingCondition newCondition = new EndingCondition();
                newCondition.cState = bool.Parse(SafeGetNodeValue(FindFirstChildNode(node, "type"), "false"));
                newCondition.cType  = (ConditionType)int.Parse(SafeGetNodeValue(FindFirstChildNode(node, "state"), "0"));
                newCondition.cValue = SafeGetNodeValue(FindFirstChildNode(node, "value"), "0");
                newEnding.conditions.Add(newCondition);
            }

            endings.Add(newEnding.id, newEnding);
        }
    }
Ejemplo n.º 7
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        Landmine landmine = collision.gameObject.GetComponent <Landmine>();

        if (landmine != null)
        {
            landmine.Explode();
        }

        Explosion explosion = collision.gameObject.GetComponent <Explosion>();

        if (explosion != null)
        {
            explosion.DisableCollision();
            Vector2 dir = (transform.position - explosion.transform.position).normalized;
            rb.velocity = new Vector2(0, 0);
            rb.AddForce(dir * explosion.explodePower, ForceMode2D.Impulse);
            outtaControl = true;
            cameraShake.Shake();
        }

        Ending ending = collision.gameObject.GetComponent <Ending>();

        if (ending != null)
        {
            RegainControl();
            rb.velocity = Vector2.zero;
            ending.End();
            Destroy(this);
        }
    }
Ejemplo n.º 8
0
        public EndScreen(ADHDGame g, SpriteBatch spb, Ending e)
            : base(g, spb)
        {
            end        = e;
            sb         = spb;
            game       = g;
            banjoEnd   = game.Content.Load <Texture2D>("newspaper_death01");
            space      = game.Content.Load <Texture2D>("spaceBG");
            explosion  = game.Content.Load <SoundEffect>("Explosion").CreateInstance();
            airlockEnd = game.Content.Load <Texture2D>("newspaper_death02");
            blackhole  = game.Content.Load <Texture2D>("newspaper_death03");
            breaks     = game.Content.Load <Texture2D>("newspaper_death04");
            thrusters  = game.Content.Load <Texture2D>("newspaper_death05");
            tutorial   = game.Content.Load <Texture2D>("tutorial");
            inactive   = game.Content.Load <Texture2D>("newspaper_death06");
            dub        = game.Content.Load <Texture2D>("newspaper_death07");
            help       = game.Content.Load <Texture2D>("newspaper_death08");

            explosion.Play();

            if (e != Ending.Banjo)
            {
                MediaPlayer.Play(game.Content.Load <Song>("SpaceRock_V1"));
            }
        }
Ejemplo n.º 9
0
    public void attMap(int index)
    {
        // print("index #" + index + " on routeMap is a " + routeMap[index]);
        if (index > 0)
        {
            routeMap[index - 1].transform.GetChild(0).gameObject.SetActive(false);
        }

        routeMap[index].transform.GetChild(0).gameObject.SetActive(true);
        //print("==> " + routeMap[index].transform.GetChild(0).gameObject.name);
        if (index == ending_trigger_index)
        {
            // print("index: " + index);
            Ending end = FindObjectOfType <Ending>();
            StartCoroutine(end.triggerEnd());
        }
        else if (index == 2)     //segunda estação
        {
            tm.initial_time_between_turns = 65;
        }
        else if (index == 4)     //terceira estação
        {
            tm.initial_time_between_turns = 60;
        }
        else if (index == 6)     //quarta estação
        {
            tm.initial_time_between_turns = 45;
        }
        else if (index == 10)     //sexta estação
        {
            tm.initial_time_between_turns = 30;
        }
        //}   tm.initial_time_between_turns = 5;
    }
Ejemplo n.º 10
0
    public void SelectEnding(Ending end)
    {
        chosen_ending = end;
        print("Ending has been chosen! It is: " + chosen_ending);
        if (Dialogue.global.conversation_number > 4)
        {
            string ending_scene_name = "";
            switch (chosen_ending)
            {
            case Ending.Death:
                ending_scene_name = "EndingDeath";
                break;

            case Ending.Escape:
                ending_scene_name = "EndingEscape";
                break;

            case Ending.Elope:
                ending_scene_name = "EndingElope";
                break;
            }

            SignalEnding.global.SetEnding(ending_scene_name);
        }
    }
        private static Accrual CreateAccrualInstance(AccrualFrequency frequency, Ending ending, int?dayOfPayA = null, int?dayOfPayB = null)
        {
            var accrual = new Accrual(
                accrualId: Guid.Parse("34bb297c-630e-4036-84c6-8925eaa88f80"),
                name: "Test Name",
                userId: "unittest|784734738",
                startingHours: 50,
                maxHours: 255,
                accrualRate: 10,
                accrualFrequency: frequency,
                dayOfPayA: dayOfPayA,
                dayOfPayB: dayOfPayB,
                startingDate: new DateTime(2018, 12, 1),
                ending: ending,
                isHeart: false,
                isArchived: false,
                minHours: 40, lastModified: new DateTime(2018, 10, 10, 3, 1, 12, 154), hourlyRate: 15,
                actions: new List <AccrualActionRecord>
            {
                new AccrualActionRecord("c153da22-6df0-4fab-8069-7ef52946c635", AccrualAction.Created, null, null, null, new DateTime(2018, 10, 10)),
                new AccrualActionRecord("e74f6d32-7ca8-4d6c-beab-89a6ff18aec3", AccrualAction.Adjustment, new DateTime(2018, 12, 3), 8, "jury duty 12/3/18", new DateTime(2018, 10, 10)),
                new AccrualActionRecord("1fdfb091-0c99-4141-8943-82df48759ebd", AccrualAction.Adjustment, new DateTime(2018, 12, 4), 8, "jury duty 12/4/18", new DateTime(2018, 10, 10)),
                new AccrualActionRecord("912304e3-ac13-4782-aa19-1be009ef164f", AccrualAction.Adjustment, new DateTime(2018, 12, 5), 8, "jury duty 12/5/18", new DateTime(2018, 10, 10)),
                new AccrualActionRecord("2badfd74-d3ee-435a-88c9-4a5f604cfca2", AccrualAction.Adjustment, new DateTime(2018, 12, 25), 8, "christmas 2018", new DateTime(2018, 10, 10)),
            });

            return(accrual);
        }
Ejemplo n.º 12
0
        public static Barline CreateBarline(BarlineProperties bi)
        {
            ObjectFactory factory = new ObjectFactory();
            Barline       barline = factory.createBarline();

            //create an ending
            if (bi.EndingValue != "")
            {
                Ending ending = factory.createEnding();
                ending.setType(StartStopDiscontinue.fromValue(bi.EndingType));
                ending.setValue(bi.EndingValue);
                barline.setEnding(ending);
            }

            //create a repeat
            if (bi.RepeatTimes != "")
            {
                Repeat repeat = factory.createRepeat();
                repeat.setTimes(new BigInteger(bi.RepeatTimes));
                repeat.setDirection(BackwardForward.fromValue(bi.RepeatDirection));
                barline.setRepeat(repeat);
            }

            //set bar line location
            if (bi.Location != "")
            {
                barline.setLocation(RightLeftMiddle.fromValue(bi.Location));
            }

            return(barline);
        }
Ejemplo n.º 13
0
        public static bool PlayCredits(MusicCtrl __instance, Ending ending)
        {
            MusicCtrl musicCtrl = __instance;

            if (CustomHell.IsHellEnabled(musicCtrl.runCtrl, CustomHellPassEffect.SPECIAL_CREDITS_THEME))
            {
                Debug.Log("Custom hell credits achieved!");
                if (ending == Ending.Genocide)
                {
                    if (playGhostOfEden(musicCtrl))
                    {
                        return(false);
                    }
                }
            }
            return(true);

            // debugging
            var clip = MusicHelper.GetAudioClipOrNull(MusicHelper.GHOST_OF_EDEN_KEY);

            if (clip == null)
            {
                return(true);
            }
            Debug.Log("Playing hopefully");
            __instance.StopIntroLoop();
            __instance.Play(clip);

            return(false);
        }
Ejemplo n.º 14
0
        static void Main()
        {
            Console.Clear();
            Intro.MainIntro();
            Console.OutputEncoding = Encoding.UTF8;
            SetupConsole();

            int totalLevels = 0;

            try
            {
                totalLevels = LoadLevels();
            }
            catch (Exception ex)
            {
                Console.Clear();
                Console.WriteLine("Unable to load the levels: {0} Exitting.", ex.Message);
                return;
            }

            for (int levelInPlay = 0; levelInPlay < totalLevels; levelInPlay++)
            {
                Console.Clear();
                PlayLevel(levelInPlay);
            }

            Ending.MainEnding();
        }
Ejemplo n.º 15
0
    void RunStates()      //Command will loop either state because switch is in update
    {
        switch (GameState)
        {
        case "Starting":
            Starting.Invoke();
            break;                     //stop and get out of the switch block

        case "Loading":
            Loading.Invoke();
            break;                     //stop and get out of the switch block

        case "Dying":
            Dying.Invoke();
            break;                     //stop and get out of the switch block

        case "Playing":
            Playing.Invoke();
            break;                     //stop and get out of the switch block

        case "Ending":
            Ending.Invoke();
            break;                     //stop and get out of the switch block
        }
    }
Ejemplo n.º 16
0
    public void OnGUI()
    {
        if (Input.GetKeyDown(KeyCode.R))
        {
            SceneManager.LoadScene("Menu");
        }

        if (Ending.IsVictorious())
        {
            victory.enabled = true;
            StartCoroutine("LoadLevelAfterDelay");
        }

        if (player_.curHealth <= 0)
        {
            music_ = GameObject.FindGameObjectWithTag("Music");
            Destroy(music_);

            GameObject sadMusic = new GameObject();
            sadMusic.AddComponent <AudioSource>();
            AudioSource audioSource = sadMusic.GetComponent <AudioSource>();
            audioSource.PlayOneShot(sadMelody);

            healthBar.sprite    = healthSprites[9];
            deathScreen.enabled = true;
            hint.enabled        = true;
        }
        else
        {
            healthBar.sprite = healthSprites[10 - player_.curHealth];
        }
    }
Ejemplo n.º 17
0
        public EndScreen(ADHDGame g, SpriteBatch spb, Ending e)
            : base(g, spb)
        {
            end = e;
            sb = spb;
            game = g;
            banjoEnd = game.Content.Load<Texture2D>("newspaper_death01");
            space = game.Content.Load<Texture2D>("spaceBG");
            explosion = game.Content.Load<SoundEffect>("Explosion").CreateInstance();
            airlockEnd = game.Content.Load<Texture2D>("newspaper_death02");
            blackhole = game.Content.Load<Texture2D>("newspaper_death03");
            breaks = game.Content.Load<Texture2D>("newspaper_death04");
            thrusters = game.Content.Load<Texture2D>("newspaper_death05");
            tutorial = game.Content.Load<Texture2D>("tutorial");
            inactive = game.Content.Load<Texture2D>("newspaper_death06");
            dub = game.Content.Load<Texture2D>("newspaper_death07");
            help = game.Content.Load<Texture2D>("newspaper_death08");

            explosion.Play();

            if (e != Ending.Banjo)
            {
                MediaPlayer.Play(game.Content.Load<Song>("SpaceRock_V1"));
            }
        }
        private static Accrual CreateAccrualInstance(Ending ending)
        {
            var accrualActionRecords = new List <AccrualActionRecord> {
                new AccrualActionRecord("e1520621-a182-4404-b927-1a9b4a2c0c80", AccrualAction.Created, null, null, null, new DateTime(2018, 10, 10))
            };

            var accrual = new Accrual(
                accrualId: Guid.Parse("34bb297c-630e-4036-84c6-8925eaa88f80"),
                userId: "unittest|784734738",
                name: "Test Name",
                startingHours: 50,
                accrualRate: 10,
                startingDate: new DateTime(2018, 7, 4),
                accrualFrequency: AccrualFrequency.Biweekly,
                ending: ending,
                lastModified: new DateTime(2018, 10, 4, 16, 43, 14, 549),
                isHeart: false,
                isArchived: false,
                hourlyRate: 15,
                dayOfPayA: 5,
                dayOfPayB: 20,
                minHours: 40,
                maxHours: 255,
                actions: accrualActionRecords);

            return(accrual);
        }
Ejemplo n.º 19
0
    void InitEndingList()
    {
        endingList = new List <Ending>();
        List <Type> assemblyTypeList = new List <Type>(GetType().Assembly.GetTypes());

        assemblyTypeList = assemblyTypeList.FindAll((Type t) =>
        {
            return(t.BaseType == typeof(Ending));
        });

        foreach (Type type in assemblyTypeList)
        {
            Ending instance = ScriptableObject.CreateInstance(type) as Ending;
            endingList.Add(instance);
        }

        foreach (Ending ending in endingList)
        {
            GameObject content = GameObject.Find(ending.GetType().Name);

            if (ending.CheckPossibility())
            {
                Button button = content.GetComponent <Button>();
                button.interactable = true;

                button.onClick.AddListener(() =>
                {
                    UIEffect.Fade(canvasGroup, 0f, 1f);
                    TaskManager.Delay(1f, () => ending.LoadEnding());
                });

                content.GetComponent <Image>().sprite = Resources.Load <Sprite>("Ending/Image/el_unlockListItem");
            }
        }
    }
Ejemplo n.º 20
0
        private void GenerateFlat(DataItem parent)
        {
            Beginning.Raise(this, EventArgs.Empty);

            var items = s_random.Next(5, 16);

            for (var i = 0; i < items; i++)
            {
                var data = CreateItem(parent);
                data.ItemChanged += DataItemChanged;

                if (parent != null)
                {
                    parent.Children.Add(data);
                }
                else
                {
                    m_data.Add(data);
                }

                ItemInserted.Raise(this, new ItemInsertedEventArgs <object>(-1, data, parent));
            }

            if (parent != null)
            {
                ItemChanged.Raise(this, new ItemChangedEventArgs <object>(parent));
            }

            Ending.Raise(this, EventArgs.Empty);
            Ended.Raise(this, EventArgs.Empty);
        }
Ejemplo n.º 21
0
 private void Reload()
 {
     Beginning.Raise(this, EventArgs.Empty);
     Reloaded.Raise(this, EventArgs.Empty);
     Ending.Raise(this, EventArgs.Empty);
     Ended.Raise(this, EventArgs.Empty);
 }
Ejemplo n.º 22
0
    private void Awake()
    {
        Instance      = this;
        _propsManager = GetComponent <PropsManager>();
        _ending       = GetComponent <Ending>();

        EverythingbutMenuBus = FMODUnity.RuntimeManager.GetBus("Bus:/Everything but Menu");
    }
Ejemplo n.º 23
0
    private void end(bool success)
    {
        finish = true;
        GameObject e      = Instantiate(ending_obj) as GameObject;
        Ending     ending = e.GetComponent <Ending>();

        ending.SetResult(success);
    }
Ejemplo n.º 24
0
 public void Reset()
 {
     ArthurHasExcalibur = false;
     _hasApple          = false;
     _arthurHealth      = ArthurMaxHealth;
     _lancelotHealth    = LancelotMaxHealth;
     ending             = Ending.N;
 }
 public Ending Save(Ending ending)
 {
     if (ending.EndingId > 0)
     {
         return(Update(ending));
     }
     return(Insert(ending));
 }
Ejemplo n.º 26
0
 // Start is called before the first frame update
 void Start()
 {
     mEnding = FindObjectOfType <Ending>();
     Debug.Assert(mEnding != null);
     cntReceived   = 0;
     itemsBox      = FindObjectOfType <ItemsBox>();
     quizReception = this.transform.Find("Area").GetComponent <QuizReception>();
 }
Ejemplo n.º 27
0
 public sSave(bool _girl, bool _back, int _count, Ending _ending, int _g_count, int _b_count)
 {
     this.bGirl   = _girl;
     this.bBack   = _back;
     this.iCount  = _count;
     this.eEnding = _ending;
     this.iGCount = _g_count;
     this.iBCount = _b_count;
 }
Ejemplo n.º 28
0
 private void FadeTimer_Elapsed(object sender, ElapsedEventArgs e)
 {
     if ((audioFileReader.TotalTime - audioFileReader.CurrentTime) <= TimeSpan.FromMilliseconds(_fadems))
     {
         Ending.Invoke(sender, e);
         fade.BeginFadeOut(_fadems);
         fadeTimer.Stop();
     }
 }
Ejemplo n.º 29
0
 private void Awake()
 {
     if (Instance != null)
     {
         Destroy(gameObject);
         return;
     }
     Instance = this;
 }
Ejemplo n.º 30
0
    public void CheckForEnding(NodeScriptable node)
    {
        Ending foundNode = endings.Find(x => x.node == node);

        if (foundNode != null)
        {
            musicSource.clip = foundNode.clip;
            musicSource.Play();
        }
    }
Ejemplo n.º 31
0
 // Start is called before the first frame update
 void Start()
 {
     mEnding = FindObjectOfType <Ending>();
     Debug.Assert(mEnding != null);
     cntReceived   = 0;
     itemsBox      = FindObjectOfType <ItemsBox>();
     quizReception = this.transform.Find("Area").GetComponent <QuizReception>();
     mShowName     = new List <ShowName>(this.transform.Find("Area").GetComponents <ShowName>());
     mShowName[0].SetActive(true);
     mShowName[1].SetActive(false);
 }
Ejemplo n.º 32
0
 private static bool IsStrong(Ending end)
 {
     return end == Ending.DoubleTwo || end == Ending.TwoOneTwo;
 }
Ejemplo n.º 33
0
 void Awake()
 {
     instance = this;
 }
Ejemplo n.º 34
0
 public LevelData(SolutionManager mgr, List<List<Material>> chcs, Ending end)
 {
     slnManager = mgr;
     choices = chcs;
     ending = end;
 }
Ejemplo n.º 35
0
 /// <summary>
 /// Добавить новую концовку
 /// </summary>
 /// <param name="ending">Новая концовка</param>
 public void AddEnding(Ending ending)
 {
     mEndings[ending.ID] = ending;
 }
Ejemplo n.º 36
0
 public void DelEnding(Ending ending)
 {
     mEndings.Remove(ending.ID);
 }
Ejemplo n.º 37
0
 public PCEndingAction(GameObject actor, Ending ending)
     : base(actor)
 {
     this.ending = ending;
 }
Ejemplo n.º 38
0
        /// <summary>
        /// return true, the next part, which will be solved, is an ending (bounded or unbounded)part
        /// </summary>
        /// <param name="ending"></param>
        /// <param name="graph"></param>
        /// <param name="l"></param>
        /// <returns></returns>
        private static bool IsEnd(Ending ending, int[] graph, int l)
        {
            bool endWithOne = graph[graph.Length - 1] == 1;

            if (ending == Ending.TwoOne)
            {
                int i = l + 1;
                while (i < graph.Length && graph[i] == 2)
                    i++;
                return i == graph.Length || (i == graph.Length - 1 && endWithOne);
            }

            int j = l;
            bool wasOne = false;
            while (j < graph.Length)
            {
                if (graph[j] == 1)
                {
                    if (wasOne)
                        return j == graph.Length - 1;
                    wasOne = true;
                }
                j++;
            }
            return true;
        }
Ejemplo n.º 39
0
 protected void chooseEnding(Ending ending)
 {
     XmlNode source = data.childNode(INTERACTIVE);
     if (source != null) {
         addPrompt(ettellPrefix + ending.displayText);
     }
     MiniGameController.endMiniGame(ending.edgeId);
 }
Ejemplo n.º 40
0
        XElement SaveEnding(Ending ending)
        {
            XElement endingElement = new XElement("Ending");

            // Свойства решений
            endingElement.SetAttributeValue("ID", ending.ID);
            endingElement.SetAttributeValue("Title", ending.Title);
            endingElement.SetAttributeValue("Description", ending.Description);
            endingElement.SetAttributeValue("Condition", ending.ConditionScript);
            endingElement.SetAttributeValue("Script", ending.GoOffScript);

            // Новые задачи
            XElement starts = new XElement("StartTasks");
            endingElement.Add(starts);
            foreach (Task task in ending.NewTasks)
            {
                XElement taskElement = SaveTask(task);
                starts.Add(taskElement);
            }
            return endingElement;
        }
Ejemplo n.º 41
0
        private Track getSuggestedTrack()
        {
            Bpm bpm = new Bpm(null);
            Year year = new Year(null);
            Ending ending = new Ending(Ending.Attribute.None);

            int temp;
            if(!String.IsNullOrEmpty(tbBpm.Text) && int.TryParse(tbBpm.Text, out temp))
                bpm.Value = temp;
            if(!String.IsNullOrEmpty(tbYear.Text) && int.TryParse(tbYear.Text, out temp))
                year.Value = temp;
            if(!String.IsNullOrEmpty(tbEnding.Text))
                if(new List<string>(Enum.GetNames(typeof(Ending.Attribute))).Contains(tbEnding.Text))
                    ending.Value = (Ending.Attribute)Enum.Parse(typeof(Ending.Attribute), tbEnding.Text);

            Track track = new Track(
                new Autor(String.IsNullOrEmpty(tbAutor.Text) ? " " : tbAutor.Text),
                bpm,
                new Code(String.IsNullOrEmpty(tbCode.Text) ? " " : tbCode.Text),
                new Interpret(String.IsNullOrEmpty(tbInterpret.Text) ? " " : tbInterpret.Text),
                new Label(String.IsNullOrEmpty(tbLabel.Text) ? " " : tbLabel.Text),
                new Laenge(String.IsNullOrEmpty(tbLaenge.Text) ? " " : tbLaenge.Text),
                new Titel(String.IsNullOrEmpty(tbTitel.Text) ? " " : tbTitel.Text),
                new Verlag(String.IsNullOrEmpty(tbVerlag.Text) ? " " : tbVerlag.Text),
                year,
                ending);

            return track;
        }
Ejemplo n.º 42
0
 private static void SetDynamic(ResultPair[] dynamic, int i, int l, int count, List<bool> labeling, Ending ending)
 {
     if (dynamic[i] == null || dynamic[i].Optimum > count + dynamic[l].Optimum ||
         (dynamic[i].Optimum == count + dynamic[l].Optimum && IsStrong(ending)))
         dynamic[i] = new ResultPair
         {
             Optimum = count + dynamic[l].Optimum,
             Labeling = dynamic[l].Labeling.Concat(labeling).ToList(),
             Ending = ending,
         };
 }
 public EndingActionConsequenceNode(GameObject actor, Ending ending)
     : base(actor, true)
 {
     this.ending = ending;
 }
Ejemplo n.º 44
0
 public void Start()
 {
     ending = GetComponent<Ending>();
     techcontrol = GetComponent<TechControl>();
     confirmPanel.SetActive(false);
     Fill.fillAmount = Mathf.Min(percent, 1);
     DisplayGrowth.text = "Fervour: ";
     GrowthWithTime = 30f;
     flameTint = flames.color;
     Growth = 1f/600f;
 }