void Awake() { gDataRef = GameObject.Find("GameManager").GetComponent <GlobalGameData>(); graphicsDataRef = GameObject.Find("GameManager").GetComponent <GraphicAssets>(); // get graphics characterWindow = GameObject.Find("Character Window Panel"); blockingPanel = GameObject.Find("Blocking Panel"); age = characterWindow.transform.Find("Age Value").GetComponent <Text>(); health = characterWindow.transform.Find("Health Value").GetComponent <Text>(); wealth = characterWindow.transform.Find("Wealth Value").GetComponent <Text>(); intelligence = characterWindow.transform.Find("Intelligence Value").GetComponent <Text>(); influence = characterWindow.transform.Find("Influence Value").GetComponent <Text>(); honor = characterWindow.transform.Find("Loyalty Value").GetComponent <Text>(); intel = characterWindow.transform.Find("Intel Value").GetComponent <Text>(); charm = characterWindow.transform.Find("Charisma Value").GetComponent <Text>(); drive = characterWindow.transform.Find("Drive Value").GetComponent <Text>(); piety = characterWindow.transform.Find("Piety Value").GetComponent <Text>(); empathy = characterWindow.transform.Find("Empathy Value").GetComponent <Text>(); passion = characterWindow.transform.Find("Will Value").GetComponent <Text>(); history = characterWindow.transform.Find("History Text").GetComponent <Text>(); CommText = characterWindow.transform.Find("Comm Text").GetComponent <Text>(); trait1 = characterWindow.transform.Find("Trait 1").GetComponent <Text>(); trait2 = characterWindow.transform.Find("Trait 2").GetComponent <Text>(); trait3 = characterWindow.transform.Find("Trait 3").GetComponent <Text>(); trait4 = characterWindow.transform.Find("Trait 4").GetComponent <Text>(); characterName = characterWindow.transform.Find("Character Name").GetComponent <Text>(); characterRank = characterWindow.transform.Find("Character Rank").GetComponent <Text>(); characterImage = characterWindow.transform.Find("Character Image").GetComponent <Image>(); aView = characterWindow.transform.Find("ScrollView").GetComponent <ActionScrollView>(); rView = characterWindow.transform.Find("Relations Scrollview").GetComponent <RelationsScrollView>(); charRankImage = characterWindow.transform.Find("Char Rank Image").GetComponent <Image>(); rank1Image = characterWindow.transform.Find("Rank 1 Image").GetComponent <Image>(); rank2Image = characterWindow.transform.Find("Rank 2 Image").GetComponent <Image>(); characterWindow.SetActive(false); // sets the window as active initially blockingPanel.SetActive(false); // this panel blocks mouse clicks from going 'through' the screen since it is supposed to be a modal screen }
void Awake() { gDataRef = GameObject.Find("GameManager").GetComponent<GlobalGameData>(); graphicsDataRef = GameObject.Find("GameManager").GetComponent<GraphicAssets>(); // get graphics characterWindow = GameObject.Find("Character Window Panel"); blockingPanel = GameObject.Find("Blocking Panel"); age = characterWindow.transform.Find("Age Value").GetComponent<Text>(); health = characterWindow.transform.Find("Health Value").GetComponent<Text>(); wealth = characterWindow.transform.Find("Wealth Value").GetComponent<Text>(); intelligence = characterWindow.transform.Find("Intelligence Value").GetComponent<Text>(); influence = characterWindow.transform.Find("Influence Value").GetComponent<Text>(); honor = characterWindow.transform.Find("Loyalty Value").GetComponent<Text>(); intel = characterWindow.transform.Find("Intel Value").GetComponent<Text>(); charm = characterWindow.transform.Find("Charisma Value").GetComponent<Text>(); drive = characterWindow.transform.Find("Drive Value").GetComponent<Text>(); piety = characterWindow.transform.Find("Piety Value").GetComponent<Text>(); empathy = characterWindow.transform.Find("Empathy Value").GetComponent<Text>(); passion = characterWindow.transform.Find("Will Value").GetComponent<Text>(); history = characterWindow.transform.Find("History Text").GetComponent<Text>(); CommText = characterWindow.transform.Find("Comm Text").GetComponent<Text>(); trait1 = characterWindow.transform.Find("Trait 1").GetComponent<Text>(); trait2 = characterWindow.transform.Find("Trait 2").GetComponent<Text>(); trait3 = characterWindow.transform.Find("Trait 3").GetComponent<Text>(); trait4 = characterWindow.transform.Find("Trait 4").GetComponent<Text>(); characterName = characterWindow.transform.Find("Character Name").GetComponent<Text>(); characterRank = characterWindow.transform.Find("Character Rank").GetComponent<Text>(); characterImage = characterWindow.transform.Find("Character Image").GetComponent<Image>(); aView = characterWindow.transform.Find("ScrollView").GetComponent<ActionScrollView>(); rView = characterWindow.transform.Find("Relations Scrollview").GetComponent<RelationsScrollView>(); charRankImage = characterWindow.transform.Find("Char Rank Image").GetComponent<Image>(); rank1Image = characterWindow.transform.Find("Rank 1 Image").GetComponent<Image>(); rank2Image = characterWindow.transform.Find("Rank 2 Image").GetComponent<Image>(); characterWindow.SetActive(false); // sets the window as active initially blockingPanel.SetActive(false); // this panel blocks mouse clicks from going 'through' the screen since it is supposed to be a modal screen }
void Awake() { gScriptRef = GameObject.Find("Main Camera").GetComponent <GalaxyCameraScript>(); // tie the game camera script to the data canvasRef = GameObject.Find("System UI Canvas").GetComponent <Canvas>(); galaxyDataRef = GameObject.Find("GameManager").GetComponent <GalaxyData>(); gameDataRef = GameObject.Find("GameManager").GetComponent <GlobalGameData>(); graphicsDataRef = GameObject.Find("GameManager").GetComponent <GraphicAssets>(); gScreenRef = GameObject.Find("GameEngine").GetComponent <GalaxyScreen>(); systemIntelLevel = GameObject.Find("Intel Level").GetComponent <Text>(); systemIntelText = GameObject.Find("Intel Level Text Label").GetComponent <Text>(); lowIntelLevelPlanetData = GameObject.Find("Low Intel Level Text").GetComponent <Text>(); noIntelLevelPlanetData = GameObject.Find("No Intel Level Text").GetComponent <Text>(); noStellarObjectText = GameObject.Find("No Stellar Object Text").GetComponent <Text>(); //systemGovernorImage = GameObject.Find("Character Image").GetComponent<Image>(); lowIntelLevelPlanetData.enabled = false; }
public void Awake() { gAssets = GameObject.Find("GameManager").GetComponent <GraphicAssets>(); }
void Awake() { uiCanvas = GameObject.Find("Character Window Canvas").GetComponent<Canvas>(); graphicDataRef = GameObject.Find("GameManager").GetComponent<GraphicAssets>(); gDataRef = GameObject.Find("GameManager").GetComponent<GlobalGameData>(); }
void Awake() { gameDataRef = GameObject.Find("GameManager").GetComponent <GlobalGameData>(); graphicsDataRef = GameObject.Find("GameManager").GetComponent <GraphicAssets>(); }
void Awake() { gameDataRef = GameObject.Find("GameManager").GetComponent<GlobalGameData>(); graphicsDataRef = GameObject.Find("GameManager").GetComponent<GraphicAssets>(); }
public static void AssignCharacterPictureID(Character cData) { graphicsDataRef = GameObject.Find("GameManager").GetComponent<GraphicAssets>(); string age = ""; string faction = ""; string strSex = ""; int index = 0; if (cData.Age < 10) age = "C"; else if (cData.Age < 40) age = "Y"; else if (cData.Age < 60) age = "M"; else age = "O"; if (cData.Lifeform == Character.eLifeformType.AI) age = "I"; faction = "Imp"; // default for now until factions are added if (cData.Gender == Character.eSex.Female) strSex = "F"; else if (cData.Gender == Character.eSex.Male) strSex = "M"; else strSex = "O"; // get how many portraits are in each folder subtype int femaleChildCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "FC").Count; int femaleYoungCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "FY").Count; int femaleMiddleAgeCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "FM").Count; int femaleOldCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "FO").Count; int maleChildCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "MC").Count; int maleYoungCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "MY").Count; int maleMiddleAgeCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "MM").Count; int maleOldCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "MO").Count; int maleOtherCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "MI").Count; int femaleOtherCount = graphicsDataRef.CharacterList.FindAll(p => p.name.Substring(3, 2) == "FI").Count; if (strSex == "F") { if (age == "C") index = UnityEngine.Random.Range(1, femaleChildCount + 1); if (age == "Y") index = UnityEngine.Random.Range(1, femaleYoungCount + 1); if (age == "M") index = UnityEngine.Random.Range(1, femaleMiddleAgeCount + 1); if (age == "O") index = UnityEngine.Random.Range(1, femaleOldCount + 1); if (age == "I") index = UnityEngine.Random.Range(1, femaleOtherCount + 1); } else if (strSex == "M") { if (age == "C") index = UnityEngine.Random.Range(1, maleChildCount + 1); if (age == "Y") index = UnityEngine.Random.Range(1, maleYoungCount + 1); if (age == "M") index = UnityEngine.Random.Range(1, maleMiddleAgeCount + 1); if (age == "O") index = UnityEngine.Random.Range(1, maleOldCount + 1); if (age == "I") index = UnityEngine.Random.Range(1, maleOtherCount + 1); } // ai pics, robot, etc else if (strSex == "O") { // if (age == "I") // //index = UnityEngine.Random.Range(1, otherCount + 1); //} } cData.PictureID = faction + strSex + age + index.ToString("N0"); }
public void Awake() { gAssets = GameObject.Find("GameManager").GetComponent<GraphicAssets>(); }
private float offsetAmount = 2.0f; // sets the distance away from the center of the tooltipped object void Awake() { uiCanvas = GameObject.Find("Character Window Canvas").GetComponent <Canvas>(); graphicDataRef = GameObject.Find("GameManager").GetComponent <GraphicAssets>(); gDataRef = GameObject.Find("GameManager").GetComponent <GlobalGameData>(); }
void Awake() { tileMapPanel = GameObject.Find("Tile Map Panel"); stellarographyPanel = GameObject.Find("Stellarography Panel"); industryDisplayButton = GameObject.Find("Industry Display Button"); economicDisplayButton = GameObject.Find("Economic Display Button"); graphicsDataRef = GameObject.Find("GameManager").GetComponent<GraphicAssets>(); intelLevelText = GameObject.Find("Intel Level Text Label").GetComponent<Text>(); intelLevelValue = GameObject.Find("Intel Level").GetComponent<Text>(); planetValueText = GameObject.Find("Planet Value Label").GetComponent<Text>(); planetValue = GameObject.Find("Planet Value").GetComponent<Text>(); starbaseText = GameObject.Find("Starbase Level Label").GetComponent<Text>(); starbaseValue = GameObject.Find("Starbase Level").GetComponent<Text>(); starbaseDataPanel = GameObject.Find("Starbase Data Panel").GetComponent<Image>(); tradeHubIndicator = GameObject.Find("Trade Hub Indicator").GetComponent<Text>(); throughputRemaining = GameObject.Find("Capacity Remaining").GetComponent<Text>(); tileMapLight = GameObject.Find("Region UI Light").GetComponent<Light>(); edictPanel = GameObject.Find("Edict Panel"); wireFrameOverlay = GameObject.Find("Wireframe Planet Overlay"); planetButtonBarBackground = GameObject.Find("Planet Button Bar Background"); gameDataRef = GameObject.Find("GameManager").GetComponent<GlobalGameData>(); planetCanvas = GameObject.Find("Planet UI Canvas").GetComponent<Canvas>(); //viceroyImageTop = GameObject.Find("Character Image").GetComponent<Image>(); }