private void Start() { rivisionValue = PublicValueStorage.Instance.GetAddSpeedRivisionValue(); parentHpBar = this.transform.parent.GetComponent <BossStatusModule>(); myParent = this.transform.parent.GetComponent <ControllerLaserNo5Ver2>(); myParentModule = myParent.GetMissileModule(); myStatus = this.GetComponent <StatusModule>(); rigidbody2D = this.GetComponent <Rigidbody2D>(); rigidbody2D.simulated = false; float gap = this.transform.GetComponent <SpriteRenderer>().bounds.extents.x; this.transform.GetChild(0).Translate(0, -gap * 0.25f, 0, Space.Self); }
private void InitOnStart() { spawnAnimation = SpawnAnimation.Start; circleCollider = this.GetComponent <CircleCollider2D>(); spriteRenderer = this.GetComponent <SpriteRenderer>(); missileModule = this.GetComponent <MissileModuleLaserNo5Ver2>(); player = PublicValueStorage.Instance.GetPlayerComponent(); circleCollider.radius = spriteRenderer.bounds.extents.x * 0.7f; // Spawn Values spawnStart = PublicValueStorage.Instance.GetBossSpawnPosition() * 3.5f; spawnEnd = PublicValueStorage.Instance.GetBossSpawnPosition(); //Debug.Log("start : " + spawnStart); //Debug.Log("end : " + spawnEnd); if (spawnSpeed <= spawnSpeedMin) { spawnSpeed = spawnSpeedMin; } }