public void Playerinit(GameObject playerobj) { myPlayer = playerobj; Player player = playerobj.GetComponent <Player>(); no = player.no; input = GetComponent <MultiInput>(); input.PlayerNo = no; CharCon = this.GetComponent <CharacterController>(); animator = GetComponentInChildren <Animator>(); Model = transform.Find("BaseModel_Hero").transform; HitAnime = GetComponent <HitAnimationBase>(); HP = gameObject.GetComponent <ObjectHp>(); MoveSpeed = Player_Special_MoveSpeed; RotationSpeed = Player_Special_RotationSpeed; player_Special_sta = PLAYER_SPECIALIST_STA.NORMAL; PlayerSta = (int)player_Special_sta; ComboFlg = false; Attack = Player_Special_ATTACK; nodamageflg = false; bomsetflg = false; HitAnime.Initialize(this); }
private void NormalAction2() { RotationCharacter(); if (input.GetButtonSquareTrigger() && ComboFlg == false) { ComboFlg = true; } if (CheckAnimationEND("conb2")) { if (ComboFlg) { player_Special_sta = PLAYER_SPECIALIST_STA.WEAKATTACK3; PlayerSta = (int)player_Special_sta; ComboFlg = false; HitAnime.HitAnimationWeakattack3(Attack); } else { player_Special_sta = PLAYER_SPECIALIST_STA.NORMAL; PlayerSta = (int)player_Special_sta; } ModelTransformReset(); } }
public override void PlayerPause() { player_Special_sta = PLAYER_SPECIALIST_STA.PAUSE; PlayerSta = (int)player_Special_sta; animator.SetTrigger("Pause"); ModelTransformReset(); }
private void PauseAction() { if (CheckAnimationEND("Pause")) { player_Special_sta = PLAYER_SPECIALIST_STA.NORMAL; PlayerSta = (int)player_Special_sta; ModelTransformReset(); } }
private void NormalAction3() { RotationCharacter(); if (CheckAnimationEND("conb3")) { player_Special_sta = PLAYER_SPECIALIST_STA.NORMAL; PlayerSta = (int)player_Special_sta; ModelTransformReset(); } }
private void SpecialAction() { RotationCharacter(); if (CheckAnimationEND("Special")) { player_Special_sta = PLAYER_SPECIALIST_STA.NORMAL; PlayerSta = (int)player_Special_sta; ModelTransformReset(); PlayerManager.instance.PlyerDoping(transform.position, no); } }
private void BomBoonAction() { RotationCharacter(); if (CheckAnimationEND("booon")) { player_Special_sta = PLAYER_SPECIALIST_STA.NORMAL; PlayerSta = (int)player_Special_sta; ModelTransformReset(); bomsetflg = false; bomb.BombswitchON(Attack); } }
public override void PlayerDamage(HitObjectImpact damage) { if (nodamageflg) { return; } player_Special_sta = PLAYER_SPECIALIST_STA.DAMAGE; PlayerSta = (int)player_Special_sta; damage.DamageHp(HP); animator.SetTrigger("Damage"); nodamageflg = true; ModelTransformReset(); }
private void BomSetAction() { Vector3 bombpos; RotationCharacter(); if (CheckAnimationEND("set")) { bombpos = transform.position; bombpos.y = 0.0f; player_Special_sta = PLAYER_SPECIALIST_STA.NORMAL; PlayerSta = (int)player_Special_sta; ModelTransformReset(); bomsetflg = true; GameObject obj = Instantiate(Bombprefab, bombpos, Quaternion.identity); bomb = obj.GetComponent <Bomb>(); bomb.InitBomb(myPlayer); } }
private void Normal() { CharCon.center = new Vector3(0, 0, 0); if (input.GetButtonSquareTrigger()) { player_Special_sta = PLAYER_SPECIALIST_STA.WEAKATTACK1; PlayerSta = (int)player_Special_sta; HitAnime.HitAnimationWeakattack1(Attack); ModelTransformReset(); } if (input.GetButtonTriangleTrigger()) { if (bomsetflg) { player_Special_sta = PLAYER_SPECIALIST_STA.BOON; PlayerSta = (int)player_Special_sta; ModelTransformReset(); } else { player_Special_sta = PLAYER_SPECIALIST_STA.SET; PlayerSta = (int)player_Special_sta; ModelTransformReset(); } } if (input.GetButtonCircleTrigger()) { player_Special_sta = PLAYER_SPECIALIST_STA.SPECIAL; PlayerSta = (int)player_Special_sta; HitAnime.HitAnimationSpecial(); ModelTransformReset(); } MoveCharacter(); if (CheckAnimationSTART("wait") || CheckAnimationSTART("run")) { ModelTransformReset(); } }