// Update is called once per frame void Update() { if (btnType == 0) { if (btnPress) { beamRifle.Shoot(); } myAnim.rifleAtk = btnPress; } else if (btnType == 1) { ForeSprite.fillAmount = multiLaser.delayTime / multiLaser.delayMaxTime; } else { ForeSprite.fillAmount = myUnitState.dashDelay / myUnitState.dashMaxDelay; } }
// Update is called once per frame void Update() { if (myUnit.targetUnit != null) { RangeAttack(myUnit.targetUnit.transform.position); } else { if (myUnit.targetBase != null && myUnit.targetBase.activeSelf == true) { RangeAttack(myUnit.targetBase.transform.position); } else { attackStart = false; } } if (myAnim.atkStart) { beamRifle.Shoot(); } if (enemyType == 1) { float per = myHealth.health / myHealth.healthMax; if (per < 0.95f) { spAttackStart = true; } } else if (enemyType == 2) { float per = myHealth.health / myHealth.healthMax; if (per < 0.95f) { spAttackStart = true; } } }