void Damage(AttackInfo attackInfo){ GameObject effect = Instantiate (hitEffect, transform.position, Quaternion.identity) as GameObject; effect.transform.localPosition = transform.position + new Vector3 (0.0f, 0.5f, 0.0f); Destroy (effect, 0.3f); status.DamageHP (attackInfo.GetAttackPower()); if(status.GetHP() <= 0){ status.SetHP(0); //体力0でダウン ChangeState(State.Died); } }
void Damage(AttackInfo attackInfo) { //ヒットエフェクト CreateHitEffect (); EffectPos (); Destroy (effect, 0.3f); //HPを減らす status.DamageHP(attackInfo.GetAttackPower()); //死体を攻撃できないようにし、体力0なので倒れる try{ eController.Down(); }catch (UnityException e){ Debug.Log("SaveExceptionLog : " + e); TextReadWriteManager write = new TextReadWriteManager(); write.WriteTextFile(Application.dataPath + "/" + "ErrorLog_Cradle.txt", e.ToString()); } }
void Damage(AttackInfo attackInfo) { this.transform.root.SendMessage ("Damage",attackInfo); }
public void FindAttackInfoComponent(){ this.attackInfo = GetComponentInChildren<AttackInfo>(); }