// Use this for initialization void Start() { // このobjectのSpriteRendererを取得 MainSpriteRenderer = gameObject.GetComponent <SpriteRenderer>(); MainSpriteRenderer.sprite = normalSprite; enemyPattern = new EnemyPatternStart(); enemyPattern.Init(this); bulletPattern = new EnemyBulletPatternNone(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); }
// エネミーの攻撃パターン変更 public void ChangeEnemyBulletPattern(EnemyBulletPattern pattern) { bulletPattern = pattern; }