void Start() { this._bullet = GetComponentInParent<BulletManage>(); ErrorLog.CheckComponentExist(this._bullet, "BulletManage", this.name); Initial(); }
public void InitData(Transform _map) { ToolRandom.srand((ulong)BattleData.Instance.randSeed); roleManage = gameObject.AddComponent <RoleManage> (); obstacleManage = gameObject.AddComponent <ObstacleManage> (); bulletManage = gameObject.AddComponent <BulletManage> (); GameVector2[] roleGrid; roleManage.InitData(_map.Find("Role"), out roleGrid); obstacleManage.InitData(_map.Find("Obstacle"), roleGrid); bulletManage.InitData(_map.Find("Bullet")); }
// Use this for initialization void Awake() { _bulletmage = this; }