void Start() { wc = GetComponent <WeaponController>(); cci = GetComponent <CharacterInformation>(); oci = GetComponent <CharacterInformation>(); controller = GetComponent <CharacterController>(); }
void Awake() { animator = GetComponent <Animator>(); characterInfor = GetComponent <CharacterInformation>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); characterCommon = GetComponent <CharacterCommon>(); }
private void OnEnable() { character = target as CharacterInformation; enemy = target as EnemyInformation; NPC = target as NPCInformation; player = target as PlayerInformation; characters = Resources.LoadAll <CharacterInformation>("Configuration"); _ID = serializedObject.FindProperty("_ID"); _name = serializedObject.FindProperty("_name"); SMParams = serializedObject.FindProperty("_SMParams"); attribute = serializedObject.FindProperty("attribute"); attrDrawer = new RoleAttributeGroupDrawer(serializedObject, attribute, lineHeight, lineHeightSpace); lineHeight = EditorGUIUtility.singleLineHeight; lineHeightSpace = lineHeight + 2; if (enemy) { EnemyInfoEnable(); } else if (NPC) { NPCInfoEnable(); } else if (player) { backpack = serializedObject.FindProperty("backpack"); } }
/// <summary> /// Populate Seiyuu information for a character /// </summary> /// <param name="character">Character to which the Seiyuu information should be added</param> /// <param name="seiyuuInfoNodes">HtmlNodes containing the Seiyuu information</param> /// <returns>Character instance</returns> private static CharacterInformation PopulateSeiyuu(this CharacterInformation character, IEnumerable <HtmlNode> seiyuuInfoNodes) { foreach (var detail in seiyuuInfoNodes) { var picNode = detail.ChildNodes[3] .ChildNodes["div"] .ChildNodes["a"] .ChildNodes["img"]; var tmpSeiyuu = new SeiyuuInformation { Language = detail.ChildNodes["td"].ChildNodes["small"].InnerText, Name = detail.ChildNodes["td"].ChildNodes["a"].InnerText, Url = MalRouteBuilder.MalCleanUrl(detail.ChildNodes["td"].ChildNodes["a"].Attributes["href"].Value), PictureUrl = (picNode.Attributes["data-src"] ?? picNode.Attributes["src"])?.Value }; int id; if (int.TryParse(tmpSeiyuu.Url.Split('/')[4], out id)) { tmpSeiyuu.Id = id; } character.Seiyuu.Add(tmpSeiyuu); } return(character); }
void OnTriggerEnter(Collider other) { CharacterInformation ci = other.GetComponent <CharacterInformation>(); ci.Zone = zone; other.GetComponent <Tracker>().updateTrackerDisplays(); }
private void Start() { _controller = transform.root.GetComponent <Controller>(); _characterInfo = transform.root.GetComponent <CharacterInformation>(); _grabHandler = transform.root.GetComponent <GrabHandler>(); _isVitalPart = GetComponent <Torso>() || GetComponent <Head>() || GetComponent <LeftLeg>() || GetComponent <RightLeg>(); }
// Start is called before the first frame update void Start() { playerPhysics = GetComponent <PlayerPhysics>(); mySpriteRenderer = GetComponent <SpriteRenderer>(); gameManagor = GameObject.Find("Main Camera").GetComponent <GameMan>(); characterInfo = new CharacterInformation(10, 2, 100); }
public void UpdateInformation(GeneralInformation GeneralInfo, MapInformation MapInfo, CharacterInformation CharInfo) { if (InvokeRequired) { Invoke(InvokeControls, GeneralInfo, MapInfo, CharInfo); } else { listView1.Items.Clear(); foreach (string thread in InformationCollecter.Instance.Threads.Keys) { listView1.Items.Add(new ListViewItem(thread)); } listView2.Clear(); foreach (string str in GeneralInfo.ToString().Split('\n')) { listView2.Items.Add(new ListViewItem(str)); } foreach (string str in CharInfo.ToString().Split('\n')) { listView2.Items.Add(new ListViewItem(str)); } foreach (string str in MapInfo.ToString().Split('\n')) { listView2.Items.Add(new ListViewItem(str)); } } }
private void Start() { charactersAvailable = Resources.LoadAll("Characters"); currentJoystickCheckTime = joystickCheckTime + 1.0f; CheckJoysticksConnected(); foreach (CharacterMenuSlotManager iSlotManager in characterSelectionPanels) { iSlotManager.UpdateSlot(0, false); iSlotManager.UpdateSlot(1, false); iSlotManager.UpdateSlot(2, false); iSlotManager.UpdateSlot(3, false); } for (int iCharacter = 0; iCharacter < characterSelectionPanels.Length; ++iCharacter) { characterSelectionPanels[iCharacter].transform.GetChild(0).GetComponent <Button>().interactable = iCharacter < charactersAvailable.Length; } for (int iCharacter = 0; iCharacter < charactersAvailable.Length; ++iCharacter) { CharacterInformation info = (charactersAvailable[iCharacter] as GameObject).GetComponent <CharacterInformation>(); characterSelectionPanels[iCharacter].transform.GetChild(0).GetComponent <Image>().sprite = info.icon; } }
protected InventoryItem scroll; // Scroll To Remove from inventory after casting protected void Super() { animator = GetComponent <CharacterAnimator>(); characterInfo = GetComponent <CharacterInformation>(); TextPopUpController = GameObject.Find("PopUpTextSystem").GetComponent <TextPopUpController>(); cam = GameObject.Find("MainCamera"); HpLeft = characterInfo.Health; }
private void Start() { _fighting = GetComponent <Fighting>(); _standing = GetComponent <Standing>(); _characterInfo = GetComponent <CharacterInformation>(); _controller = GetComponent <Controller>(); _grabHandler = GetComponent <GrabHandler>(); }
private void ClearOldInstances() { while (CreatedCharacters.Count > 0) { CharacterInformation ch = CreatedCharacters.Pop(); Destroy(ch.gameObject); } }
public void BeginThreads() { Threads.Add("MapleStory", new Thread(new ThreadStart(() => { while (true) { try { Process MapleStory = Process.GetProcessById(ProcessID); ProcessHandle = MapleStory.Handle; MainWindowHandle = MapleStory.MainWindowHandle; GeneralInfo.ProcessHandle = ProcessHandle; } catch { Environment.Exit(0); } Thread.Sleep(100); } }))); GeneralInfo = new GeneralInformation(); Threads.Add("GeneralInformation", new Thread( new ThreadStart(UpdateGeneralInformation))); MapInfo = new MapInformation(); Threads.Add("MapInformation", new Thread( new ThreadStart(UpdateMapInformation))); CharInfo = new CharacterInformation(); Threads.Add("CharacterInformation", new Thread( new ThreadStart(UpdateCharacterInformation))); Threads.Add("Position", new Thread(new ThreadStart(() => { int CharacterBase = (int)BasePointer.CharacterBase; int MonsterBase = (int)BasePointer.MonsterBase; int Mob1 = (int)Offset.Mob1, Mob2 = (int)Offset.Mob2, Mob3 = (int)Offset.Mob3, Mob4 = (int)Offset.Mob4; int MouseBase = (int)BasePointer.MouseBase; int MouseLocationBase = (int)Offset.MouseLocation; while (true) { CharInfo.Position = new Point( ReadInt32Pointer(CharacterBase, (int)Offset.CharacterX), ReadInt32Pointer(CharacterBase, (int)Offset.CharacterY)); UpdatePosition(); CharInfo.MouseAnimation = ReadInt32Pointer(MouseBase, (int)Offset.MouseAnimation); CharInfo.MouseLocation = new Point( ReadInt32MultiPointer(MouseBase, new int[] { MouseLocationBase, (int)Offset.MouseX }), ReadInt32MultiPointer(MouseBase, new int[] { MouseLocationBase, (int)Offset.MouseY })); MapInfo.MobPosition = new Point( ReadInt32MultiPointer(MonsterBase, new int[] { Mob1, Mob2, Mob3, Mob4, (int)Offset.MobX }), ReadInt32MultiPointer(MonsterBase, new int[] { Mob1, Mob2, Mob3, Mob4, (int)Offset.MobY })); Thread.Sleep(1); } }))); foreach (Thread thread in Threads.Values) { thread.Start(); } }
public bool CelebPictureCollisions() { bool value = false; // The bool value to be returned from the function //Collider[] hitColliders = Physics.OverlapBox(new Vector3(transform.localPosition.x, transform.localPosition.y, transform.localPosition.z + (collider.z / 2f)), collider, Quaternion.identity, celebLayer); Collider[] hitColliders = Physics.OverlapBox(Vector3.zero, collider, Quaternion.identity, celebLayer); // Calculate the planes from the main camera's view frustum Plane[] planes = GeometryUtility.CalculateFrustumPlanes(Camera.main); // Check each collider detected to see if its a celeb foreach (Collider c in hitColliders) { bool onScreen = false; // is the celeb visible on Screen // we see someone // check from characterinfo CharacterInformation instance = c.GetComponent <CharacterInformation>(); if (instance.GetInfo().CharID >= 0) // it is a celeb { // Check if the c collider is within bounds of the camera frustrum if (GeometryUtility.TestPlanesAABB(planes, c.bounds)) { // Linecast to see if anything is in the way or the celeb is on screen if (Physics.Linecast(Camera.main.transform.position, c.transform.position, out RaycastHit hitInfo, (1 << celebLayer << waypointLayer))) { Debug.Log(c.name + " blocked by " + hitInfo.collider.name); } else { Debug.Log(c.name + " has been detected!"); onScreen = true; } } else { Debug.Log(c.name + " Not within Camera frustrum"); onScreen = false; } // If the celeb is on screen get their info if (onScreen == true) { // get celeb name string celebName = instance.GetInfo().Name; Debug.Log("You photographed " + celebName); // add the character to the list of celebs in picture characters.Add(instance.GetInfo()); // a celeb was found return true value = true; } } //Debug.Log(c.name + " is not a celebrity"); }
private void SetPlayerComponents() { characterInformation = GetComponent <CharacterInformation>(); statisticsLevelUpdater = GetComponent <StatisticsLevelUpdater>(); characterUIView = GetComponent <CharacterUIView>(); basicStatsUIView = GetComponent <BasicStatsUIView>(); duelStatsUIView = GetComponent <DuelStatsUIView>(); }
void Awake() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); playerCommon = player.GetComponent <CharacterCommon>(); monster = GetComponent <MonsterControll>(); monsterCommon = GetComponent <CharacterCommon>(); monsterInfor = GetComponent <CharacterInformation>(); attackLocation = transform.Find("Effect/Attack"); }
private void Start() { _rightLeg = GetComponentInChildren <RightLeg>().transform; _leftLeg = GetComponentInChildren <LeftLeg>().transform; _characterInfo = GetComponent <CharacterInformation>(); _controller = GetComponent <Controller>(); _timer = 0f; }
void Start() { characterInformation = character.GetComponent <CharacterInformation>(); //curPendants = characterInformation.Pendants; health = characterInformation.Health; chrt = currentHealth.GetComponent <RectTransform>(); parentSize = currentHealth.transform.parent.GetComponent <RectTransform>(); healthUnit = (1f / health.TotalHealth) * chrt.sizeDelta.x; }
private void Start() { m_movement = GetComponent <Movement>(); m_characterInfo = GetComponent <CharacterInformation>(); GrabHandler = GetComponent <GrabHandler>(); m_hip = GetComponentInChildren <Hip>().GetComponent <Rigidbody>(); m_animation = GetComponent <Animations>(); m_rotation = GetComponent <Rotation>(); m_playerController = GetComponent <PlayerController>(); }
public void OnCharacterDeath(CharacterInformation character) { character.Dead = true; TurnOrderView.CharacterDied(character); Debug.Log($"{character.Abilities.Name} is now dead. Checking if enemies in combat."); if (CheckEnemiesInCombat()) { return; } TurnBasedMode(false); }
// Update is called once per frame void Update() { player = GameObject.FindGameObjectWithTag("Player"); if (player) { ci = player.GetComponent<CharacterInformation>(); maxHP = ci.maxHp; curHP = ci.curHp; } }
bool ExistsID() { CharacterInformation find = Array.Find(characters, x => x.ID == _ID.stringValue); if (!find) { return(false); //若没有找到,则ID可用 } //找到的对象不是原对象 或者 找到的对象是原对象且同ID超过一个 时为true return(find != character || (find == character && Array.FindAll(characters, x => x.ID == _ID.stringValue).Length > 1)); }
private Thumbnail GerarThumbnail(CharacterInformation characterInformation) { return(new Thumbnail { CharacterInformation = characterInformation, CharacterInformationId = characterInformation.Id, Id = GerarNumero(), Path = GerarTexto(), Extension = GerarTexto() }); }
/// <summary> /// this is only /// to make the pause /// menu /// </summary> private void Start() { Time.timeScale = 1.0f; puase.enabled = false; inventory.enabled = false; character = Instantiate( original: Resources.Load("ScriptableObjects/Characters/Alyassa") as CharacterInformation); //PlayerItems.Capacity = (int)character.Strength.Value; }
public void UpdateInformationPos(CharacterInformation CharInfo) { if (InvokeRequired) { Invoke(InvokeControlsPos, CharInfo); } else { label5.Text = string.Format("Position: X: {0} Y: {1}", CharInfo.Position.X, CharInfo.Position.Y); } }
private void Start() { _characterInfo = GetComponent <CharacterInformation>(); _leftKnee = GetRigidBody(GetComponentInChildren <LeftKnee>()); _rightKnee = GetRigidBody(GetComponentInChildren <RightKnee>()); _leftLeg = GetRigidBody(GetComponentInChildren <LeftLeg>()); _rightLeg = GetRigidBody(GetComponentInChildren <RightLeg>()); }
public virtual void Attack(CharacterInformation characterInfo, string targetTag) { if (characterInfo.target != null) { if (characterInfo.target.tag == targetTag) { CharacterScript targetScript = characterInfo.target.GetComponent <CharacterScript>(); targetScript.TakeDamage(weapon.damage); } } }
public void TestGetEigenschaft() { var sut = new CharacterInformation("", 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0); Assert.AreEqual(1, sut.GetEigenschaft(Eigenschaft.MU)); Assert.AreEqual(2, sut.GetEigenschaft(Eigenschaft.KL)); Assert.AreEqual(3, sut.GetEigenschaft(Eigenschaft.IN)); Assert.AreEqual(4, sut.GetEigenschaft(Eigenschaft.CH)); Assert.AreEqual(5, sut.GetEigenschaft(Eigenschaft.FF)); Assert.AreEqual(6, sut.GetEigenschaft(Eigenschaft.KK)); Assert.AreEqual(7, sut.GetEigenschaft(Eigenschaft.KO)); Assert.AreEqual(8, sut.GetEigenschaft(Eigenschaft.GE)); }
public GameObject AssembleCharacterWithoutAI(string label) { AddCharacterToLoad(label); CharacterInformation ci = null; if (_activedCharacters.TryGetValue(label, out ci)) { GameObject model = CharacterFactory.Singleton.AssembleCharacter(ci.modelPath); return(model); } return(null); }
public void Awake() { if (!RoR2Application.isModded) { RoR2Application.isModded = true; } var info = new CharacterInformation("Whatever", "This is the description"); var creator = new CharacterCreator(); creator.Create <MyCustomCharacter>(info, PrefabCollection.CommandoBody, PrefabCollection.CommandoDisplay); }
private Stories GerarStories(CharacterInformation characterInformation) { Stories stories = new Stories { CharacterInformation = characterInformation, CharacterInformationId = characterInformation.Id, Id = GerarNumero(), Available = GerarNumero(), CollectionURI = GerarTexto() }; stories.Items = GerarStoriesItem(stories); return(stories); }
// Update is called once per frame public virtual void Update() { player = GameObject.FindGameObjectWithTag("Player"); if (player) { mainCharInfo = player.GetComponent<CharacterInformation>(); float curDis = Vector3.Distance(player.transform.position, this.transform.position); if (!mainCharInfo.isDead) { if (curDis <= 15) { isHitByPlayer = true; } else if (curDis >= 25) { isHitByPlayer = false; } } } curTime = Time.time; searching(); if (isHitByPlayer) { targetPlayer(); } else { if (isChasingHeadQuater) { targetHeadQuater(); } else { targetTower(); } } }
//Sets/Gets the character's names and respective sprites to be used for the slots public void SetCharactersList(LevelCharactersInfo characters) { List<string> charNames = new List<string>(); List<string> charSprites = new List<string>(); List<int> charIndexPosition = new List<int>(); charInfoList = new List<CharacterInformation>(); //Use the cafeteria list if (customLevel.levelSelect == 1) { for (int i = 0; i < cafeteriaCharactersNames.Count; i++) { charNames.Add(cafeteriaCharactersNames [i]); charSprites.Add(cafeteriaCharactersSprites [i]); charIndexPosition.Add(cafeteriaExclusivePositions [i]); } } //Another level list else { charNames = cafeteriaCharactersNames; charSprites = cafeteriaCharactersSprites; } //Add the names and sprites of the characters neutral of the level for (int i = 0; i < neutralCharactersNames.Count; i++) { charNames.Add(neutralCharactersNames [i]); charSprites.Add(neutralCharactersSprites [i]); } //Fills the character info to be given to the slots for (int i = 0; i < charNames.Count; i++) { CharacterInformation charInfo = new CharacterInformation(); charInfo.name = charNames [i]; charInfo.spriteName = charSprites [i]; if (i < charIndexPosition.Count) charInfo.characterIndexPosition = charIndexPosition [i]; else charInfo.characterIndexPosition = i + 1; charInfoList.Add(charInfo); } }
void Start() { ci = GetComponent<CharacterInformation>(); cam = GameObject.Find("CameraCombat").camera; }