/// <summary>ダメージを与えます。</summary> /// <param name="value">ダメージ値(負数で回復)。</param> /// <returns>続行可能な場合、true。</returns> public bool damage(int value) { bool resullt = true; StateCharacter state = currentState as StateCharacter; if (state != null) { resullt = state.damage(this, value); } return(resullt); }
public void CheckState() { switch (state) { case StateCharacter.None: enableMovement = true; break; case StateCharacter.Congelado: if (delayStateCongelado > 0) { delayStateCongelado = delayStateCongelado - Time.deltaTime; enableMovement = false; } else { state = StateCharacter.None; } break; case StateCharacter.Desangrado: break; case StateCharacter.Electrificado: break; case StateCharacter.Electrocutado: break; case StateCharacter.Inmolacion: break; case StateCharacter.Lentitud: break; case StateCharacter.Quemado: break; case StateCharacter.Sobrecarga: break; case StateCharacter.Veneno: break; } }