void Start() { SetCharacterStatus(); //uiManager = GameObject.FindWithTag("UIManager").GetComponent<UIManager>(); animator = GetComponent <Animator> (); this.CharAudio = this.gameObject.GetComponent <AudioSource> (); state = CharacterState.Idle; rigdbody = GetComponent <Rigidbody> (); enermy = GameObject.FindGameObjectsWithTag("Enermy"); testinput = GameObject.Find("TestInputManager").GetComponent <TestInputManager> (); charDir = true; JumpMove = false; weapon = this.gameObject.GetComponentInChildren <CharWeapon> (); CharAudio.volume = 0.3f; jumpPower = 10; comboCount = 0; SetClassObject(); //StartCoroutine (MoveSoundCol ()); }
public void InitializeCharacter() { animator = GetComponent <Animator>(); rigdbody = GetComponent <Rigidbody>(); CharAudio = GetComponent <AudioSource>(); enermy = DungeonManager.Instance.Monsters; weapon = GetComponentInChildren <CharWeapon>(); charWeapon = weapon.GetComponent <BoxCollider>(); weapon.InitializeCharacterWeapon(this); charDir = true; JumpMove = false; CharAudio.volume = 0.3f; jumpPower = 10; comboCount = 0; state = CharacterState.Idle; SetClassSound(); SetClassEffect(); UIManager.Instance.BattleUIManager.hpBarCalculation(characterStatus.MaxHealthPoint, characterStatus.HealthPoint); UIManager.Instance.BattleUIManager.mpBarCalculation(characterStatus.MaxMagicPoint, characterStatus.MagicPoint); }