private void SubInitializeAboutProperties(string kind){ switch(kind){ case "KIND1": velocity = new Vector3(0, 0, 0); sprite = GameObject.Instantiate(spritePrefabs) as SingleSprite_; sprite.transform.parent = transform; sprite.Initialize("Obstacle_00"); break; } }
private void SubInitializeAboutProperties(string kind){ switch(kind){ case "KIND1": velocity = new Vector3(-200.0f, 0, 0); sprite = GameObject.Instantiate(spritePrefabs) as SingleSprite_; sprite.transform.parent = transform; sprite.Initialize("EnemyFish"); col = transform.collider as SphereCollider; col.radius = sprite.Width() / 2; break; case "KIND2": velocity = new Vector3(-150.0f, 0, 0); sprite = GameObject.Instantiate(spritePrefabs) as SingleSprite_; sprite.transform.parent = transform; sprite.Initialize("EnemyFish"); col = transform.collider as SphereCollider; col.radius = sprite.Width() / 2; break; } }