// Start is called before the first frame update void Start() { remainRepair = repairTime; repairBar.gameObject.SetActive(false); startTimer = timer; ship = FindObjectOfType <ShipDamage>(); }
public void shipDamaged(ShipDamage damage) { damagedSections++; if (damagedSections >= damagedToSink) { //Sink ship } }
public new void Start() { damageScript = GameObject.FindGameObjectWithTag("Player").GetComponent <ShipDamage>(); TotalValue = damageScript.TotalHealth; CurrentValue = TotalValue - damageScript.Damage; MinAngle = startAngle; MaxAngle = finishAngle; base.Start(); }
public new void Start() { damageScript = GameObject.FindGameObjectWithTag("Player").GetComponent<ShipDamage>(); TotalValue = damageScript.TotalHealth; CurrentValue = TotalValue - damageScript.Damage; MinAngle = startAngle; MaxAngle = finishAngle; base.Start(); }
void Awake() { movement = GetComponent <ShipMovement>(); damage = GetComponent <ShipDamage>(); shooter = GetComponent <ShipShooterManager>(); positiveThrottle.fillAmount = 0; negativeThrottle.fillAmount = 0; positiveSteering.fillAmount = 0; negativeSteering.fillAmount = 0; }
private void OnTriggerEnter(Collider other) { ShipDamage shipCollided = other?.GetComponent <ShipDamage>(); if (shipCollided != null) { if (shipCollided.GetTeam() != m_Team) { ConfirmHit(); } } }
private void Start() { timer = startTimer; player = FindObjectOfType <PlayerMovement>(); ship = FindObjectOfType <ShipDamage>(); }