//private void OnApplicationQuit() //{ // Debug.Log("Do OnApplicationQuit"); // int length = playerSelectedFightInfoPairs.Count; // Player[] players = new Player[length]; // playerSelectedFightInfoPairs.Keys.CopyTo(players, 0); // foreach (Player tempPlayer in players) // { // //PlayerInputInfo.SavePlayerInputConfig(tempPlayer); // Player.SavePlayerInputConfig(tempPlayer); // } //} public void SpawFighters() { int dicCount = playerSelectedFightInfoPairs.Count; Player[] keys = new Player[dicCount]; playerSelectedFightInfoPairs.Keys.CopyTo(keys, 0); FighterSpawInfo[] values = new FighterSpawInfo[dicCount]; playerSelectedFightInfoPairs.Values.CopyTo(values, 0); for (int i = 0; i < dicCount; i++) { Player thisPlayer = keys[i]; FighterSpawInfo thisFighterInfo = values[i]; Vector3 position = Vector3.right * (-3 + 6 * i); GameObject tempFighterGO = Instantiate(fighterPrefab, position, Quaternion.identity); tempFighterGO.name = thisFighterInfo.fighterName; FightInput input = tempFighterGO.GetComponent <FightInput>(); input.inputInfo = thisPlayer.playerInputInfo; SkillManager tempFighterSkillManager = tempFighterGO.GetComponent <SkillManager>(); tempFighterSkillManager.testSkillTypes = thisFighterInfo.skillTypeNames; FighterAttributesManager tempFighterAttrManager = tempFighterGO.GetComponent <FighterAttributesManager>(); tempFighterAttrManager.fighterAttr = thisFighterInfo.fighterAttr; playerFighterInsPairs.Add(thisPlayer, tempFighterGO); } }
public Status(GameObject rootGO, StatusManager statusManager, Animator anim) { this.rootGO = rootGO; myStatusManager = statusManager; this.anim = anim; input = myStatusManager.fightInput; }
// Start is called before the first frame update void Start() { fightInput = GetComponent <FightInput>(); anim = GetComponent <Animator>(); myStatus = CreateMyStatus(testStatusTypes); goManagerPairs.Add(gameObject, this); }
// Start is called before the first frame update void Start() { if (fightInput == null) { fightInput = GetComponent <FightInput>(); } if (thisTransform == null) { thisTransform = transform; } }
// Start is called before the first frame update void Start() { anim = GetComponent <Animator>(); fightInput = GetComponent <FightInput>(); mySkills = CreateMySkills(testSkillTypes); rootSkills = SelectRootSkills(mySkills); layerHurtOnly = LayerMask.NameToLayer("HurtOnly"); layerAttackOnly = LayerMask.NameToLayer("AttackOnly"); goManagerPairs.Add(gameObject, this); }
public Skill(GameObject rootGO, SkillManager skillManager, Animator anim) { this.rootGO = rootGO; mySkillManager = skillManager; this.anim = anim; input = mySkillManager.fightInput; attrManager = this.rootGO.GetComponent <FighterAttributesManager>(); info = LoadSpawSkillInfo(); if (info != null) { orderKeyCodeIdxs = info.orderKeyCodeIdxs; influencePartGOs = FindGameObjects(info.influencedPartGameObjectNames); } }