protected virtual void OnDamage(Hitpoints hitpoints) { if(myAnimator != null) { myAnimator.SetTrigger("damage"); } }
protected override void OnDamage(Hitpoints hitpoints) { base.OnDamage (hitpoints); if(hitpoints.hitpoints > thirdFormActivationHitpoints && hitpoints.hitpoints <= secondFormActivationHitpoints) { ActivateSecondForm(); } else if(hitpoints.hitpoints > 0 && hitpoints.hitpoints <= thirdFormActivationHitpoints) { ActivateThirdForm(); } }
public void Assign(Ship ship, Color labelColor) { this.ship = ship; hitpoints = ship.GetComponent<Hitpoints>(); wingmanCaptain = ship.GetComponent<WingmanCaptain>(); nameLabel.color = labelColor; foreach (var selectionImage in selectionOverlay.GetComponentsInChildren<Image>()) { selectionImage.color = labelColor; } Update(); }
private void Start() { attachedHitpoints = GetComponent <Hitpoints>(); }
protected virtual void OnKill(Hitpoints hitpoints) { DestroyMe(); }
protected virtual void Awake() { _hitpoints = GetComponent <Hitpoints> (); }
public void NegativeSectorsThrows() { hitpoints = new Hitpoints(-1, 1, 1); }
public string ToString() { return($"Name: {Name}\nHP: {Hitpoints.ToString()}"); }
public virtual void Initialize () { this._health = new Hitpoints (1); }
private void OnKill(Hitpoints hitpoints) { myCollider2D.enabled = false; myRigidbody2D.gravityScale = 0f; playerInput.enabled = false; myAnimator.SetTrigger ("die"); myRigidbody2D.velocity = Vector2.zero; StartCoroutine (PlayDeathFX ()); }
private void OnDamage(Hitpoints hitpoints) { myAnimator.SetBool ("receiveDamage", true); }
void Awake() { if(myAnimator == null) { Debug.LogError(gameObject + " animator is null. Please set the reference."); } weaponManager = GetComponent<MegamanWeaponManager> (); hitpoints = GetComponent<Hitpoints> (); _myRigidbody2D = GetComponent<Rigidbody2D> (); _myCollider2D = GetComponent<Collider2D> (); myJump2D = GetComponent<Jump2D> (); myWallJump2D = GetComponent<WallJump2D> (); playerInput = GetComponent<MegamanInput> (); }
void Start() { _hp = GetComponent <Hitpoints>(); }
void OnKill(Hitpoints hitpoints) { IntroStageCamera2DFollow cameraManager = GameObject.FindObjectOfType<IntroStageCamera2DFollow>(); myRigidbody2D.constraints = RigidbodyConstraints2D.FreezePositionX | RigidbodyConstraints2D.FreezeRotation; cameraManager.EnableDefaultMode (); }
public void setup() { hitpoints = new Hitpoints(2, 100, 100); }
private void OnDamage(Hitpoints hitpoints) { myAnimator.SetBool("receiveDamage", true); }
protected virtual void Awake() { _hitpoints = GetComponent<Hitpoints> (); }
protected virtual void OnHitpointsDestroying(object sender, ToolkitEventArgs e) { _hitpoints = null; UnsubscribeFromHealthDelegates(); }
protected virtual void OnKill(Hitpoints hitpoints) { DestroyMe (); }
protected virtual void HitpointsControllerDestroying(object sender, ToolkitEventArgs e) { UnsubscribeFromHealthControllerDelegates(); StopRegeneration(); _hitpointsController = null; }
public void OnDamage(Hitpoints hitpoints) { img.fillAmount = hitpoints.GetRemainingHealthPercentage () / 100; }
private void InitializeProperties() { Classes = new Dictionary<ClassType, IClass>(); Attacks = new AttackList(this); Saves = new SavesList(this); Hitpoints = new Hitpoints(); Equipment = new Equipment(this); Features = new FeatureList(); Skills = new SkillList(this); Experience = new Experience(this); }
public void ZeroSectorsThrows() { hitpoints = new Hitpoints(0, 1, 1); }