// Start is called before the first frame update void Start() { rend = GetComponentInChildren <Renderer>(); submarine = GetComponent <Submarine>(); weapon = GetComponent <Weapon>(); submarine.Init(rend.transform.parent); hurtable = GetComponent <Hurtable>(); hurtable.Initialize(config.HealthConfig); }
// Start is called before the first frame update void Start() { rend = GetComponentInChildren <Renderer>(); submarine = GetComponent <Submarine>(); weapon = GetComponent <Weapon>(); submarine.Init(rend.transform.parent, config); hurtable = GetComponent <Hurtable>(); hurtable.Initialize(config.HealthConfig); ReadConfig(); crosshair = GetComponentInChildren <FollowMouse>(); }