public void Init() { GenerateTarget(); //Save off Agent Data AgentData = new CharacterCreationData(); AgentData.lID[ClothesHolder.HATS_INDEX] = 0; AgentData.lColor[ClothesHolder.HATS_INDEX] = CurrentTarget.AgentHatColor.Color; AgentData.lID[ClothesHolder.TOPS_INDEX] = 0; AgentData.lColor[ClothesHolder.TOPS_INDEX] = CurrentTarget.AgentCoatColor.Color; AgentData.lID[ClothesHolder.BOTTOMS_INDEX] = 0; AgentData.lColor[ClothesHolder.BOTTOMS_INDEX] = CurrentTarget.AgentPantsColor.Color; //Save off Target Data TargetData = new CharacterCreationData(); TargetData.lID[ClothesHolder.HATS_INDEX] = 0; TargetData.lColor[ClothesHolder.HATS_INDEX] = CurrentTarget.TargetHatColor.Color; TargetData.lID[ClothesHolder.TOPS_INDEX] = 0; TargetData.lColor[ClothesHolder.TOPS_INDEX] = CurrentTarget.TargetCoatColor.Color; TargetData.lID[ClothesHolder.BOTTOMS_INDEX] = 0; TargetData.lColor[ClothesHolder.BOTTOMS_INDEX] = CurrentTarget.TargetPantsColor.Color; iHatID = Random.RandomRange(0, Game.MAX_NPC) % Game.MAX_NPC; iTopID = Random.RandomRange(0, Game.MAX_NPC) % Game.MAX_NPC; iBottomID = Random.RandomRange(0, Game.MAX_NPC) % Game.MAX_NPC; }
public void SetClothes(CharacterCreationData eventData) { SetClothes(ClothesHolder.HATS_INDEX, eventData.lID[ClothesHolder.HATS_INDEX], eventData.lColor[ClothesHolder.HATS_INDEX]); SetClothes(ClothesHolder.TOPS_INDEX, eventData.lID[ClothesHolder.TOPS_INDEX], eventData.lColor[ClothesHolder.TOPS_INDEX]); SetClothes(ClothesHolder.BOTTOMS_INDEX, eventData.lID[ClothesHolder.BOTTOMS_INDEX], eventData.lColor[ClothesHolder.BOTTOMS_INDEX]); Redraw(); }
public void StartGame() { cClothes = this.gameObject.GetComponent <ClothesHolder>(); if (cClothes == null) { Debug.Log("Game: Start: ClothesHolder is not attached! HELLO?"); } cClothes.Init(); cSuspicionController = this.gameObject.GetComponent <SuspicionController>(); if (cSuspicionController == null) { cSuspicionController = this.gameObject.AddComponent <SuspicionController>(); } cSuspicionController.Init(); cTargetManager = goTargetManager.GetComponent <TargetManager>(); if (cTargetManager == null) { Debug.Log("***WARNING*** cTargetManager NULL"); } cTargetManager.Init(); goSpawns = GameObject.Find("Spawn Point Container"); cSpawns = goSpawns.GetComponent <SpawnPointHolder>(); if (cSpawns == null) { Debug.Log("***WARNING*** CSpawns null"); } cSpawns.Reset(); //Characters GameObject player = Instantiate(playerPrefab); playerTransform = player.transform; PlayerController playerController = player.GetComponent <PlayerController>(); if (playerController != null) { playerController.SetClothes(cTargetManager.AgentData); } npcs.Add(Instantiate(NPCPrefab)); npcs[npcs.Count - 1].gameObject.transform.position = cSpawns.GetSpawnPoint().position; NPCController cNPCController = npcs[npcs.Count - 1].GetComponent <NPCController>(); if (cNPCController != null) { cNPCController.SetClothes(cTargetManager.TargetData); } CharacterCreationData npcData; for (int i = 0; i < MAX_NPC; ++i) { npcs.Add(Instantiate(NPCPrefab)); npcs[npcs.Count - 1].gameObject.transform.position = cSpawns.GetSpawnPoint().position; cNPCController = npcs[npcs.Count - 1].GetComponent <NPCController>(); if (cNPCController != null) { npcData = new CharacterCreationData(); npcData.lID[ClothesHolder.HATS_INDEX] = 0; npcData.lColor[ClothesHolder.HATS_INDEX] = cTargetManager.iHatID == i ? cTargetManager.TargetData.lColor[ClothesHolder.HATS_INDEX] : new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f)); npcData.lID[ClothesHolder.TOPS_INDEX] = 0; npcData.lColor[ClothesHolder.TOPS_INDEX] = cTargetManager.iTopID == i ? cTargetManager.TargetData.lColor[ClothesHolder.TOPS_INDEX] : new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f)); npcData.lID[ClothesHolder.BOTTOMS_INDEX] = 0; npcData.lColor[ClothesHolder.BOTTOMS_INDEX] = cTargetManager.iBottomID == i ? cTargetManager.TargetData.lColor[ClothesHolder.BOTTOMS_INDEX] : new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f)); cNPCController.SetClothes(npcData); } } GameObject.Find("FollowCamera").GetComponent <ShittyFollowCam>().StartCamera(); }
public void SetClothes(CharacterCreationData eventData) { Init(); base.SetClothes(eventData); }
public void SetClothes(CharacterCreationData eventData) { clothesController.SetClothes(eventData); }