private void Awake() { m_rigidbody2D = GetComponent <Rigidbody2D>(); m_spriteRenderer = GetComponent <SpriteRenderer>(); bData = GameDataManager.Instance.BulletData; m_projectileSize = bData.uSize; m_projectileSpeed = bData.uSpeed; m_spriteRenderer.enabled = bData.uVisible; m_ricochet = bData.uRicochet; m_traverse = bData.uTraverse; if (m_traverse) { gameObject.layer = LayerMask.NameToLayer("ThroughWall"); } else { gameObject.layer = LayerMask.NameToLayer("Bullet"); } }
public void CreateDatas() { BulletData = new Bullet_Data(); WallData = new Wall_Data(); CharacterData = new Character_Data(); }