void Start() { instance = GetInstance(); PlayableCharacter mainCharacter = gameObject.GetComponent <PlayableCharacter>(); CharacterParty.JoinParty(mainCharacter); spriteRenderer = GetComponent <SpriteRenderer>(); charStats.InitCharacterStats(); if (currentEquipment.currentArmor != null) { EquipableItem armor = currentEquipment.currentArmor; armor.ApplyItemEquiped(this); if (!Game.returningFromBattle && !battlePrefab) { armor.AddItem(1, false); Destroy(armor.equipmentMenuList.Find(armor.menuEquipPrefab.name + "(Clone)").gameObject); } } if (currentEquipment.currentWeapon != null) { EquipableItem currentWeapon = currentEquipment.currentWeapon; currentWeapon.ApplyItemEquiped(this); if (!Game.returningFromBattle && !battlePrefab) { currentWeapon.AddItem(1, false); Destroy(currentWeapon.equipmentMenuList.Find(currentWeapon.menuEquipPrefab.name + "(Clone)").gameObject); } } orderInLayer = spriteRenderer.sortingOrder; if (Game.initialized) { LoadCharacter(); } CharGameObject = gameObject; //Debug.Log ("total attack: " + charStats.totalAttack); }