コード例 #1
0
 public void SetHintMessage(hintType hintType, string txt, bool autoFade, float waitTime = 3f)
 {
     hintTxts[(int)hintType].color = new Color(hintTxts[(int)hintType].color.r, hintTxts[(int)hintType].color.g, hintTxts[(int)hintType].color.b, 1);
     hintTxts[(int)hintType].text  = txt;
     isFading = false;
     if (autoFade)
     {
         HintTextFadeOff(hintType, waitTime);
     }
 }
コード例 #2
0
        IEnumerator FadeOff(hintType hintType, float waitTime = 3f)
        {
            isFading = true;
            if (isFading)
            {
                yield return(new WaitForSeconds(waitTime));

                while (hintTxts[(int)hintType].color.a >= 0)
                {
                    if (!isFading)
                    {
                        yield break;
                    }

                    hintTxts[(int)hintType].color -= new Color(0f, 0f, 0f, 2f * Time.deltaTime);
                    yield return(new WaitForEndOfFrame());
                }
            }

            hintTxts[(int)hintType].text  = "";
            hintTxts[(int)hintType].color = new Color(hintTxts[(int)hintType].color.r, hintTxts[(int)hintType].color.g, hintTxts[(int)hintType].color.b, 1);

            isFading = false;
        }
コード例 #3
0
 public void HintTextFadeOff(hintType hintType, float waitTime = 3f)
 {
     hintTxts[(int)hintType].color = new Color(hintTxts[(int)hintType].color.r, hintTxts[(int)hintType].color.g, hintTxts[(int)hintType].color.b, 1);
     StartCoroutine(FadeOff(hintType, waitTime));
 }
コード例 #4
0
        public void popHint(hintType hint)
        {
            if (disabled)
            {
                return;
            }
            if (hasShown[(int)hint])
            {
                return;
            }
            hasShown[(int)hint] = true;

            if (hint == hintType.INFILTRATION)
            {
                String msg = "Infiltration is a core element of agent gameplay, and a very good strategy is to begin building infiltration with your first few agents, before moving on to making use of this foundation with your second wave (possibly after the first have met an unfortunate end)."
                             + "It represents your cultists, embedded in human society, working their way into all levels of human society."
                             + "\n\nInfiltration can be seen on the location information, by a map view or by dark tendrils reaching into infiltrated locations' map icons. It is very hard for humans to remove your infiltration (it almost always requires moving or removing the location's noble), and many agents can benefit"
                             + " from operating in infilrated locations."
                             + "\n\nVampires and Merchants can infiltrate at first, then a Seeker or Plague Doctor can act unnoticed, once the initial work has been set up to let them operate efficiently.";
                map.world.prefabStore.popMsgHint(msg, "Hint: Infiltration");
            }
            else if (hint == hintType.ENTHRALLED_NOBLES)
            {
                String msg = "Enthralled Nobles are complex tools, with a range of strategies. The primary strategy is the political career."
                             + "\n\nYour enthralled noble often starts at a very low level, and must rise the ranks through careful ally building and sabotage of your rivals (using your agents or Dark Powers)."
                             + "\n\nIf they reach a high rank in society, they can enshadow themselves, and spread shadow to all the nobles of lesser prestige."
                             + "\n\nIf they reach the top of the society, they can declare a Dark Empire using an ability, which will spread shadow to all the society's nobles over time, advancing your progress to victory considerably, " +
                             "and giving you a warlike collection of broken nobles to use to invade your weaker neighbours to spread the shadow still further.";
                map.world.prefabStore.popMsgHint(msg, "Hint: Enthralled Nobles");
            }
            else if (hint == hintType.EVIDENCE)
            {
                String msg = "Your agent has left evidence behind, as indicated by the question mark on the location on the map."
                             + "\n\nIf evidence is inside a society, it will immediately alert the society that something is wrong, and they may try to take defensive action (such as raising security), despite not knowing who left the evidence behind"
                             + "\n\nTo discover the identity of your agent, the evidence must be investigated by an enemy agent. They will perform an investigation action if they find the evidence, " +
                             "and will then gain suspicions, which they can use to warn nobles or to track down your agents.";
                map.world.prefabStore.popMsgHint(msg, "Hint: Evidence");
            }
            else if (hint == hintType.AWARENESS)
            {
                String msg = "Awareness is increasing in the world, as the nobles realise something is very wrong. As they watch their world fall, either to shadow or to monsterous horrors, the world panic will increase."
                             + "This panic will become awareness, as they consult with sages, prophecies and ancient libraries. With enough awareness, nobles can begin working together to defeat you."
                             + "\n\nYou can keep track of awareness by using the associated map view (Accessible via number keys) to discover where this threat to your power is growing.";
                map.world.prefabStore.popMsgHint(msg, "Hint: Awareness");
            }
            else if (hint == hintType.POWER)
            {
                String msg = "Dark Power is how you employ your powers, as opposed to actions taken by agents or the free abilities. It can go both negative or above the maximum, but you will not be"
                             + " able to use powers while it is less than zero, and will not regain any while it is above maximum."
                             + "\n\nPower gain increases as world panic grows, as you draw energy from the dying world, and if you possess an enthralled noble their prestige will add as a percentage gain" +
                             " (so if they have 35 prestige, you will regain power 35% faster).";
                map.world.prefabStore.popMsgHint(msg, "Hint: Power");
            }
            else if (hint == hintType.ENTHRALLED_EVIDENCE)
            {
                String msg = "There is evidence against your enthralled noble. While agents drop evidence on the map, nobles have evidence percentages visible on the left-hand-side panel. While they have evidence," +
                             " other nobles will slowly gain suspicion against them. The best way of dealing with evidence is to give it to another, using an ability while selecting that noble's location. This ability requires them" +
                             "to like your enthralled noble sufficiently to do them this favour, and will transfer some of your evidence to them. Do so quickly, before enough nobles are sufficiently suspicious of you to" +
                             " start hating you and take actions against you.";
                map.world.prefabStore.popMsgHint(msg, "Hint: Enthralled Evidence");
            }
            else
            {
                String msg = "Unhandled hint: " + hint;
                map.world.prefabStore.popMsgHint(msg, "Hint: Message missing");
            }
        }