public void setTo(Person p)
 {
     profileBack.sprite    = p.getImageBack();
     profileMid.sprite     = p.getImageMid();
     profileFore.sprite    = p.getImageFore();
     profileBorder.sprite  = p.getImageBorder();
     textName.text         = p.getFullName();
     textPrestige.text     = "Prestige: " + (int)p.prestige;
     textVotingOption.text = "Voting: " + p.getVote(p.society.voteSession).info(p.society.voteSession.issue);
     voter = p;
 }
 public void populate(Society soc, Person agent)
 {
     this.agent               = agent;
     societyName.text         = soc.getName();
     textVotingIssue.text     = soc.voteSession.issue.ToString();
     textVotingIssueDesc.text = soc.voteSession.issue.getLargeDesc();
     textProposer.text        = "Proposed by: " + soc.voteSession.issue.proposer.getFullName();
     textProposerVote.text    = "Voting For: " + soc.voteSession.issue.proposer.getVote(soc.voteSession).info(soc.voteSession.issue);
     proposerBack.sprite      = soc.voteSession.issue.proposer.getImageBack();
     proposerMid.sprite       = soc.voteSession.issue.proposer.getImageMid();
     proposerFore.sprite      = soc.voteSession.issue.proposer.getImageFore();
     proposerBorder.sprite    = soc.voteSession.issue.proposer.getImageBorder();
     foreach (Person p in soc.people)
     {
         PopVoterBar bar = world.prefabStore.getVoterBar(p);
         //bar.gameObject.transform.parent = this.gameObject.transform;
         voterBars.Add(bar);
     }
     foreach (VoteOption opt in soc.voteSession.issue.options)
     {
         PopOptBar bar = world.prefabStore.getVoteOptBar(opt, soc.voteSession);
         //bar.gameObject.transform.parent = this.gameObject.transform;
         voteOptBars.Add(bar);
     }
     if (agent != null)
     {
         textAgentName.text = "Interacting with:\n" + agent.getFullName();
         agentBack.sprite   = agent.getImageBack();
         agentBorder.sprite = agent.getImageBorder();
         agentFore.sprite   = agent.getImageFore();
         agentMid.sprite    = agent.getImageMid();
         textAgentDesc.text = "You may use the voter's liking for " + agent.getFullName() + " to sway their votes one way or another, spending this liking as political capital.";
     }
     else
     {
         agentBack.sprite   = world.textureStore.icon_mask;
         agentMid.sprite    = world.textureStore.icon_mask;
         agentBorder.sprite = world.textureStore.slotCount;
         agentFore.sprite   = world.textureStore.icon_mask;
         textAgentName.text = "Interacting without character";
         textAgentDesc.text = "If you interact with a society with an enthralled noble, or use an agent, you can spend the liking the voters have towards them to sway their votes.";
     }
     sess = soc.voteSession;
     checkData();
 }
Exemplo n.º 3
0
        public void setTo(Person p)
        {
            profileBack.sprite   = p.getImageBack();
            profileMid.sprite    = p.getImageMid();
            profileFore.sprite   = p.getImageFore();
            profileBorder.sprite = p.getImageBorder();


            if (World.staticMap.param.option_useAdvancedGraphics == 1)
            {
                if (p.isMale)
                {
                    profileMid.sprite    = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                }
                else
                {
                    profileMid.sprite    = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                }
                profileFore.sprite = p.getImageFore();
            }
            else
            {
                layerAdvEyes.sprite  = World.staticMap.world.textureStore.person_advClear;
                layerAdvMouth.sprite = World.staticMap.world.textureStore.person_advClear;
                layerAdvHair.sprite  = World.staticMap.world.textureStore.person_advClear;
                layerAdvJewel.sprite = World.staticMap.world.textureStore.person_advClear;
            }

            textName.text         = p.getFullName();
            textPrestige.text     = "Prestige: " + (int)p.prestige;
            textVotingOption.text = "Voting: " + p.getVote(p.society.voteSession).info(p.society.voteSession.issue);
            voter = p;
        }
        public void setTo(Person person)
        {
            this.person = person;

            title.text         = person.getFullName();
            layerBack.sprite   = person.getImageBack();
            layerBorder.sprite = person.getImageBorder();
            layerFore.sprite   = person.getImageFore();
            layerMid.sprite    = person.getImageMid();


            if (World.staticMap.param.option_useAdvancedGraphics == 1)
            {
                Person p = person;
                if (p.isMale)
                {
                    layerMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                }
                else
                {
                    layerMid.sprite      = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                    layerAdvEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                    layerAdvMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                    layerAdvHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                    layerAdvJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                }
                layerFore.sprite = p.getImageFore();
            }
            else
            {
                layerAdvEyes.sprite  = World.staticMap.world.textureStore.person_advClear;
                layerAdvMouth.sprite = World.staticMap.world.textureStore.person_advClear;
                layerAdvHair.sprite  = World.staticMap.world.textureStore.person_advClear;
                layerAdvJewel.sprite = World.staticMap.world.textureStore.person_advClear;
            }
        }
Exemplo n.º 5
0
        public void populate(Society soc, Person agent)
        {
            this.agent               = agent;
            societyName.text         = soc.getName();
            textVotingIssue.text     = soc.voteSession.issue.ToString();
            textVotingIssueDesc.text = soc.voteSession.issue.getLargeDesc();
            textProposer.text        = "Proposed by: " + soc.voteSession.issue.proposer.getFullName();
            if (soc.voteSession.issue.proposer != null)
            {
                World.log("Proposer: " + soc.voteSession.issue.proposer.getFullName());
                World.log("Text " + textProposerVote);
                textProposerVote.text = "Voting For: " + soc.voteSession.issue.proposer.getVote(soc.voteSession).info(soc.voteSession.issue);
                proposerBack.sprite   = soc.voteSession.issue.proposer.getImageBack();
                proposerMid.sprite    = soc.voteSession.issue.proposer.getImageMid();
                proposerFore.sprite   = soc.voteSession.issue.proposer.getImageFore();
                proposerBorder.sprite = soc.voteSession.issue.proposer.getImageBorder();
            }
            else
            {
                Person arbitrary = soc.getSovereign();
                if (arbitrary == null)
                {
                    arbitrary = soc.people[0];
                }
                if (arbitrary != null)
                {
                    textProposerVote.text = "";
                    proposerBack.sprite   = arbitrary.getImageBack();
                    proposerMid.sprite    = arbitrary.getImageMid();
                    proposerFore.sprite   = arbitrary.getImageFore();
                    proposerBorder.sprite = arbitrary.getImageBorder();
                }
            }
            foreach (Person p in soc.people)
            {
                PopVoterBar bar = world.prefabStore.getVoterBar(p);
                //bar.gameObject.transform.parent = this.gameObject.transform;
                voterBars.Add(bar);
            }
            foreach (VoteOption opt in soc.voteSession.issue.options)
            {
                PopOptBar bar = world.prefabStore.getVoteOptBar(opt, soc.voteSession);
                //bar.gameObject.transform.parent = this.gameObject.transform;
                voteOptBars.Add(bar);
            }
            viewSelf.gameObject.SetActive(false);
            if (agent != null)
            {
                textAgentName.text = "Interacting with:\n" + agent.getFullName();
                agentBack.sprite   = agent.getImageBack();
                agentBorder.sprite = agent.getImageBorder();
                agentFore.sprite   = agent.getImageFore();
                agentMid.sprite    = agent.getImageMid();
                textAgentDesc.text = "You may use the voter's liking for " + agent.getFullName() + " to sway their votes one way or another, spending this liking as political capital.";
            }
            else
            {
                agentBack.sprite   = world.textureStore.icon_mask;
                agentMid.sprite    = world.textureStore.icon_mask;
                agentBorder.sprite = world.textureStore.slotCount;
                agentFore.sprite   = world.textureStore.icon_mask;
                textAgentName.text = "Interacting without character";
                textAgentDesc.text = "If you interact with a society with an enthralled noble, or use an agent, you can spend the liking the voters have towards them to sway their votes.";
            }


            if (World.staticMap.param.option_useAdvancedGraphics == 1 && agent != null)
            {
                Person p = agent;
                if (p.isMale)
                {
                    agentMid.sprite   = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_faces[p.imgAdvFace];
                    agentEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_eyes[p.imgAdvEyes];
                    agentMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_mouths[p.imgAdvMouth];
                    agentHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_hair[p.imgAdvHair];
                    agentJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].m_jewels[p.imgAdvJewel];
                }
                else
                {
                    agentMid.sprite   = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_faces[p.imgAdvFace];
                    agentEyes.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_eyes[p.imgAdvEyes];
                    agentMouth.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_mouths[p.imgAdvMouth];
                    agentHair.sprite  = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_hair[p.imgAdvHair];
                    agentJewel.sprite = p.map.world.textureStore.cultures[p.culture.graphicsIndex].f_jewels[p.imgAdvJewel];
                }
                agentFore.sprite = p.getImageFore();
            }
            else
            {
                agentEyes.sprite  = World.self.textureStore.person_advClear;
                agentMouth.sprite = World.self.textureStore.person_advClear;
                agentHair.sprite  = World.self.textureStore.person_advClear;
                agentJewel.sprite = World.self.textureStore.person_advClear;
            }
            lastPos = World.self.ui.uiInputs.scrollwheelTracking;

            sess = soc.voteSession;
            checkData();

            if (agent != null && agent == soc.map.overmind.enthralled)
            {
                bGoToSelf();
                viewSelf.gameObject.SetActive(true);
            }
        }