//public void DisplayAllFactionRelations()
    //{
    //	_factionRelationsText.text = "\tFaction Relations: \n";
    //	for (int foreignFactionIndex = 0; foreignFactionIndex < _factionRelations[(int)Globals.PlayerFaction].Length; foreignFactionIndex++)
    //	{
    //		if (_factionRelations[(int)Globals.PlayerFaction][foreignFactionIndex] != -1)
    //		{
    //			_factionRelationsText.text += ((Globals.FactionNames)foreignFactionIndex).ToString() + ": " + _factionRelations[(int)Globals.PlayerFaction][foreignFactionIndex] + "\n";
    //		}
    //	}
    //}

    private void AttachFactionRelationsBreakdownToWindowsPromptText(Globals.FactionNames factionId)
    {
        List <FactionRelationElementData> relationElements = FactionRelations.GetFactionRelationElementData(factionId);

        for (int relationElementIndex = 0; relationElementIndex < relationElements.Count; relationElementIndex++)
        {
            _windowPromptText.text += relationElements[relationElementIndex].FactionRelationElementId.ToString() + ": "
                                      + relationElements[relationElementIndex].Value + "\n";
        }
    }
    public void DisplayFactionRelationsWithPlayer(Globals.FactionNames factionId)
    {
        int playerOnFaction = -1;
        int factionOnPlayer = -1;

        FactionRelations.GetRelationsWithPlayer(factionId, out playerOnFaction, out factionOnPlayer);

        _factionRelationsText.text = "\t" + factionId.ToString() + "\n\tFaction Relations: \n" + "Our views on them: " + playerOnFaction + "\nTheir views on us: " + factionOnPlayer
                                     + "\n Current status: " + FactionRelations.GetRelationStatusWithPlayer(factionId);
    }
示例#3
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Debug.Log("More than 1 instance " + this.GetType().ToString());
         Destroy(this);
     }
     DontDestroyOnLoad(this);
 }
示例#4
0
    public void PreInitialize()
    {
        _factionRelations = new FactionRelations();

        _factionRelations.PreInitialize(Globals.NumberOfFactions);
    }